mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 23:27:17 +03:00
style: Fix gofmt and vet complaints
This commit is contained in:
parent
7848b62af7
commit
2abe368022
@ -18,7 +18,7 @@ install:
|
|||||||
script:
|
script:
|
||||||
- diff <(echo -n) <(gofmt -s -d .)
|
- diff <(echo -n) <(gofmt -s -d .)
|
||||||
- ineffassign .
|
- ineffassign .
|
||||||
- go vet ./...
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
- go test $(go list ./... | grep -v /vendor/)
|
- go test $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
@ -174,14 +174,14 @@ func init() {
|
|||||||
palette := readableColors256()
|
palette := readableColors256()
|
||||||
|
|
||||||
Themes = []Theme{
|
Themes = []Theme{
|
||||||
Theme{
|
{
|
||||||
id: "colors",
|
id: "colors",
|
||||||
names: palette,
|
names: palette,
|
||||||
sys: palette.Get(8), // Grey
|
sys: palette.Get(8), // Grey
|
||||||
pm: palette.Get(7), // White
|
pm: palette.Get(7), // White
|
||||||
highlight: style(Bold + "\033[48;5;11m\033[38;5;16m"), // Yellow highlight
|
highlight: style(Bold + "\033[48;5;11m\033[38;5;16m"), // Yellow highlight
|
||||||
},
|
},
|
||||||
Theme{
|
{
|
||||||
id: "mono",
|
id: "mono",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
2
host.go
2
host.go
@ -197,7 +197,7 @@ func (h *Host) completeName(partial string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Host) completeCommand(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) {
|
if strings.HasPrefix(cmd, partial) {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,11 @@ func parsePtyRequest(s []byte) (width, height int, ok bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func parseWinchRequest(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 {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
height32, s, ok := parseUint32(s)
|
height32, _, ok := parseUint32(s)
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user