#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
echo "Checking file format ..."
found=`gofmt -l \`find . -name "*.go" |grep -v "./vendor"\` 2>&1`
if [ $? -ne 0 ]; then
   echo "The following files need reformatting with 'gofmt -w <file>':"
   echo "$badformat"
   exit 1
fi
echo "All files are properly formatted"
