style: Fix gofmt and vet complaints
authorAndrey Petrov <andrey.petrov@shazow.net>
Sun, 31 Jul 2016 16:18:06 +0000 (12:18 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Sun, 31 Jul 2016 16:18:06 +0000 (12:18 -0400)
.travis.yml
chat/message/theme.go
host.go
sshd/pty.go

index eeda0f3c96d1b5d5d5e35118353cfd6aa551a62e..13d16ff59838ff82ee563583cc644ed7e6c13246 100644 (file)
@@ -18,7 +18,7 @@ install:
 script:
   - diff <(echo -n) <(gofmt -s -d .)
   - ineffassign .
-  - go vet ./...
+  - go vet $(go list ./... | grep -v /vendor/)
   - go test $(go list ./... | grep -v /vendor/)
 
 after_script:
index 8250b591564bba85ecf308c4ccad341fe61d8ff3..be4f9cd74165ae1479624df548e132e949ab67de 100644 (file)
@@ -174,14 +174,14 @@ func init() {
        palette := readableColors256()
 
        Themes = []Theme{
-               Theme{
+               {
                        id:        "colors",
                        names:     palette,
                        sys:       palette.Get(8),                             // Grey
                        pm:        palette.Get(7),                             // White
                        highlight: style(Bold + "\033[48;5;11m\033[38;5;16m"), // Yellow highlight
                },
-               Theme{
+               {
                        id: "mono",
                },
        }
diff --git a/host.go b/host.go
index 50178581972a8afaeaf476f780115577f8dc6ee2..07af926bd0aa2e01f6a6cb613f737cc65e8fa4d2 100644 (file)
--- a/host.go
+++ b/host.go
@@ -197,7 +197,7 @@ func (h *Host) completeName(partial string) string {
 }
 
 func (h *Host) completeCommand(partial string) string {
-       for cmd, _ := range h.commands {
+       for cmd := range h.commands {
                if strings.HasPrefix(cmd, partial) {
                        return cmd
                }
index 06d34f037683fc11a3f4856120da842548a8c30c..4443fd338173eba021fadf1e6300565b06e12338 100644 (file)
@@ -28,11 +28,11 @@ func parsePtyRequest(s []byte) (width, height int, ok bool) {
 }
 
 func parseWinchRequest(s []byte) (width, height int, ok bool) {
-       width32, s, ok := parseUint32(s)
+       width32, _, ok := parseUint32(s)
        if !ok {
                return
        }
-       height32, s, ok := parseUint32(s)
+       height32, _, ok := parseUint32(s)
        if !ok {
                return
        }