diff --git a/msgpack/encode.go b/msgpack/encode.go index 22ba89d0..6174c001 100644 --- a/msgpack/encode.go +++ b/msgpack/encode.go @@ -381,7 +381,8 @@ func (b *encodeBuilder) structEncoder(t reflect.Type) encodeFunc { name: f.name, empty: empty, index: f.index, - f: encoderForType(f.typ, b)} + f: encoderForType(f.typ, b), + } } if array { diff --git a/msgpack/rpc/rpc.go b/msgpack/rpc/rpc.go index bc9e68a6..c974d209 100644 --- a/msgpack/rpc/rpc.go +++ b/msgpack/rpc/rpc.go @@ -148,7 +148,6 @@ func NewEndpoint(r io.Reader, w io.Writer, c io.Closer, options ...Option) (*End option.f(e) } return e, nil - } func (e *Endpoint) decodeUint(what string) (uint64, error) { diff --git a/nvim/api_test.go b/nvim/api_test.go index dd2dfcea..af2840b9 100644 --- a/nvim/api_test.go +++ b/nvim/api_test.go @@ -3621,7 +3621,7 @@ func testHighlight(v *Nvim) func(*testing.T) { } const HLIDName = `PreProc` - var wantErrorHLID = 85 + wantErrorHLID := 85 if nvimVersion.Minor >= 8 { wantErrorHLID += 3 } @@ -3729,7 +3729,7 @@ func testHighlight(v *Nvim) func(*testing.T) { } const HLIDName = `PreProc` - var wantErrorHLID = 85 + wantErrorHLID := 85 if nvimVersion.Minor >= 8 { wantErrorHLID += 3 } @@ -4495,7 +4495,7 @@ func testPutPaste(v *Nvim) func(*testing.T) { if err != nil { t.Fatal(err) } - var want = "!foobarbaz!" + want := "!foobarbaz!" if nvimVersion.Minor >= 7 { want = "!!foobarbaz" } @@ -4526,7 +4526,7 @@ func testPutPaste(v *Nvim) func(*testing.T) { if err := b.Execute(); err != nil { t.Fatal(err) } - var want = "!foobarbaz!" + want := "!foobarbaz!" if nvimVersion.Minor >= 7 { want = "!!foobarbaz" } diff --git a/nvim/api_tool.go b/nvim/api_tool.go index 87ed02b1..3e7f6c83 100644 --- a/nvim/api_tool.go +++ b/nvim/api_tool.go @@ -405,7 +405,7 @@ func printImplementation(functions []*Function, tmpl *template.Template, outFile } if outFile != "" { - return ioutil.WriteFile(outFile, out, 0666) + return ioutil.WriteFile(outFile, out, 0o666) } _, err = os.Stdout.Write(out) return err diff --git a/nvim/plugin/main.go b/nvim/plugin/main.go index c18ce864..e34e8ab3 100644 --- a/nvim/plugin/main.go +++ b/nvim/plugin/main.go @@ -76,7 +76,7 @@ func overwriteManifest(path, host string, manifest []byte) error { return err } output := replaceManifest(host, input, manifest) - return ioutil.WriteFile(path, output, 0666) + return ioutil.WriteFile(path, output, 0o666) } func replaceManifest(host string, input, manifest []byte) []byte { diff --git a/nvim/plugin/manifest_test.go b/nvim/plugin/manifest_test.go index 5dca1aa2..ff39bec1 100644 --- a/nvim/plugin/manifest_test.go +++ b/nvim/plugin/manifest_test.go @@ -13,7 +13,7 @@ const ( func TestReplaceManifest(t *testing.T) { t.Parallel() - var replaceManifestTests = []struct { + replaceManifestTests := []struct { name string original string expected string