commit
e59e2f6cd5
@ -2,9 +2,9 @@ package network
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sort"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type InterfaceGenerator interface {
|
type InterfaceGenerator interface {
|
||||||
|
8
test
8
test
@ -26,9 +26,9 @@ declare -a TESTPKGS=(initialize
|
|||||||
network)
|
network)
|
||||||
|
|
||||||
if [ -z "$PKG" ]; then
|
if [ -z "$PKG" ]; then
|
||||||
GOFMTPATH="$TESTPKGS coreos-cloudinit.go"
|
GOFMTPATH="${TESTPKGS[*]} coreos-cloudinit.go"
|
||||||
# prepend repo path to each package
|
# prepend repo path to each package
|
||||||
TESTPKGS="${TESTPKGS[@]/#/${REPO_PATH}/} ./"
|
TESTPKGS="${TESTPKGS[*]/#/${REPO_PATH}/} ./"
|
||||||
else
|
else
|
||||||
GOFMTPATH="$TESTPKGS"
|
GOFMTPATH="$TESTPKGS"
|
||||||
# strip out slashes and dots from PKG=./foo/
|
# strip out slashes and dots from PKG=./foo/
|
||||||
@ -43,5 +43,9 @@ go test ${COVER} $@ ${TESTPKGS}
|
|||||||
|
|
||||||
echo "Checking gofmt..."
|
echo "Checking gofmt..."
|
||||||
fmtRes=$(gofmt -l $GOFMTPATH)
|
fmtRes=$(gofmt -l $GOFMTPATH)
|
||||||
|
if [ -n "$fmtRes" ]; then
|
||||||
|
echo "$fmtRes"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Success"
|
echo "Success"
|
||||||
|
Loading…
Reference in New Issue
Block a user