From d5f1c233bfbb80228e89c673c65d8f29c9e9e557 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 18 Nov 2016 10:40:37 +0000 Subject: [PATCH] Remove punctuation from the end of error messages to placate the linter --- ipam/ring/ring.go | 4 ++-- nameserver/entry.go | 2 +- net/route.go | 4 ++-- prog/weaveutil/attach.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ipam/ring/ring.go b/ipam/ring/ring.go index 65882af3..3cd45099 100644 --- a/ipam/ring/ring.go +++ b/ipam/ring/ring.go @@ -41,8 +41,8 @@ var ( ErrNotSorted = errors.New("Ring not sorted") ErrTokenRepeated = errors.New("Token appears twice in ring") ErrTokenOutOfRange = errors.New("Token is out of range") - ErrDifferentSeeds = errors.New("Received ring was seeded differently from ours!") - ErrDifferentRange = errors.New("Received range differs from ours!") + ErrDifferentSeeds = errors.New("Received ring was seeded differently from ours") + ErrDifferentRange = errors.New("Received range differs from ours") ) func errInconsistentEntry(mine, theirs *entry) error { diff --git a/nameserver/entry.go b/nameserver/entry.go index dbda956d..d8b2c67e 100644 --- a/nameserver/entry.go +++ b/nameserver/entry.go @@ -120,7 +120,7 @@ func (e1 *Entry) tombstone() bool { func check(es SortableEntries) error { if !sort.IsSorted(es) { - return fmt.Errorf("Not sorted!") + return fmt.Errorf("Not sorted") } for i := 1; i < es.Len(); i++ { if es.Get(i).equal(es.Get(i - 1)) { diff --git a/net/route.go b/net/route.go index 1e815c52..ffb882dd 100644 --- a/net/route.go +++ b/net/route.go @@ -13,7 +13,7 @@ import ( func CheckNetworkFree(subnet *net.IPNet, ignoreIfaceNames map[string]struct{}) error { return forEachRoute(ignoreIfaceNames, func(route netlink.Route) error { if route.Dst != nil && overlaps(route.Dst, subnet) { - return fmt.Errorf("Network %s overlaps with existing route %s on host.", subnet, route.Dst) + return fmt.Errorf("Network %s overlaps with existing route %s on host", subnet, route.Dst) } return nil }) @@ -29,7 +29,7 @@ func overlaps(n1, n2 *net.IPNet) bool { func CheckAddressOverlap(addr net.IP, ignoreIfaceNames map[string]struct{}) error { return forEachRoute(ignoreIfaceNames, func(route netlink.Route) error { if route.Dst != nil && route.Dst.Contains(addr) { - return fmt.Errorf("Address %s overlaps with existing route %s on host.", addr, route.Dst) + return fmt.Errorf("Address %s overlaps with existing route %s on host", addr, route.Dst) } return nil }) diff --git a/prog/weaveutil/attach.go b/prog/weaveutil/attach.go index fd45810e..6de93ce4 100644 --- a/prog/weaveutil/attach.go +++ b/prog/weaveutil/attach.go @@ -44,7 +44,7 @@ func attach(args []string) error { if nsHost, err := netns.GetFromPid(1); err != nil { return fmt.Errorf("unable to open host namespace: %s", err) } else if nsHost.Equal(nsContainer) { - return fmt.Errorf("Container is running in the host network namespace, and therefore cannot be\nconnected to weave. Perhaps the container was started with --net=host.") + return fmt.Errorf("Container is running in the host network namespace, and therefore cannot be\nconnected to weave - perhaps the container was started with --net=host") } mtu, err := strconv.Atoi(args[2]) if err != nil && args[3] != "" {