Skip to content

Instantly share code, notes, and snippets.

@urandom
Created February 23, 2020 19:20
Show Gist options
  • Save urandom/53bccd1a28b0ef865fd82cad244b90af to your computer and use it in GitHub Desktop.
Save urandom/53bccd1a28b0ef865fd82cad244b90af to your computer and use it in GitHub Desktop.
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 176 40 40 41 0 0 0 { "\t" }
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 177 40 41 41 2 2 2 { "\t\t" }
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 177 }}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 177 } }}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go"}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 36, line = 42 }, start = { character = 18, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 49, line = 42 }, start = { character = 38, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 100, line = 56 }, start = { character = 18, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 59, line = 56 }, start = { character = 40, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 97, line = 56 }, start = { character = 69, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 65, line = 86 }, start = { character = 35, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 83, line = 86 }, start = { character = 67, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 135, line = 86 }, start = { character = 125, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 51, line = 93 }, start = { character = 21, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 69, line = 93 }, start = { character = 53, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 38, line = 94 }, start = { character = 21, line = 94 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 50, line = 116 }, start = { character = 20, line = 116 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 68, line = 116 }, start = { character = 52, line = 116 } }, severity = 2, source = "composites", tags = { 1 } } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 36, line = 42 }, start = { character = 18, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 49, line = 42 }, start = { character = 38, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 100, line = 56 }, start = { character = 18, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 59, line = 56 }, start = { character = 40, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 97, line = 56 }, start = { character = 69, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 65, line = 86 }, start = { character = 35, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 83, line = 86 }, start = { character = 67, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 135, line = 86 }, start = { character = 125, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 51, line = 93 }, start = { character = 21, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 69, line = 93 }, start = { character = 53, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 38, line = 94 }, start = { character = 21, line = 94 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 50, line = 116 }, start = { character = 20, line = 116 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 68, line = 116 }, start = { character = 52, line = 116 } }, severity = 2, source = "composites", tags = { 1 } } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go"}
[ DEBUG ] 2020-02-23T20:18:33Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 36, line = 42 }, start = { character = 18, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 49, line = 42 }, start = { character = 38, line = 42 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 100, line = 56 }, start = { character = 18, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 59, line = 56 }, start = { character = 40, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 97, line = 56 }, start = { character = 69, line = 56 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 65, line = 86 }, start = { character = 35, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 83, line = 86 }, start = { character = 67, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 135, line = 86 }, start = { character = 125, line = 86 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 51, line = 93 }, start = { character = 21, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 69, line = 93 }, start = { character = 53, line = 93 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 38, line = 94 }, start = { character = 21, line = 94 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 50, line = 116 }, start = { character = 20, line = 116 } }, severity = 2, source = "composites", tags = { 1 } }, { message = "go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields", range = { end = { character = 68, line = 116 }, start = { character = 52, line = 116 } }, severity = 2, source = "composites", tags = { 1 } } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 178 40 41 41 3 3 3 { "\t\t{" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 178 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 178 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 179 40 41 41 4 4 4 { "\t\t{}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 179 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 179 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 4, line = 40 }, start = { character = 4, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 179 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 4, line = 40 }, start = { character = 4, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 179}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 4, line = 40 }, start = { character = 4, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 179 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go"}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = {}, uri = "file:///home/urandom/Projects/feature-toggles/storage/mongo.go" }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 3, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 46, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 3, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 46, jsonrpc = "2.0", result = { isIncomplete = true, items = { { detail = "string", filterText = "name", insertTextFormat = 1, kind = 5, label = "name", preselect = true, sortText = "00000", textEdit = { newText = "name", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "args", filterText = "name", insertTextFormat = 1, kind = 5, label = "args", sortText = "00001", textEdit = { newText = "args", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "[]toggle.Flag", filterText = "name", insertTextFormat = 1, kind = 5, label = "initial", sortText = "00002", textEdit = { newText = "initial", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "[]toggle.Flag", filterText = "name", insertTextFormat = 1, kind = 5, label = "want", sortText = "00003", textEdit = { newText = "want", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "bool", filterText = "name", insertTextFormat = 1, kind = 5, label = "wantErr", sortText = "00004", textEdit = { newText = "wantErr", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "string", filterText = "name", insertTextFormat = 1, kind = 6, label = "mongoURL", sortText = "00005", textEdit = { newText = "mongoURL", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(handler http.HandlerFunc, method string, url string, values url.Values) string", documentation = "HTTPBody is a helper that returns HTTP body of the response.", filterText = "name", insertTextFormat = 1, kind = 3, label = "assert.HTTPBody", sortText = "00006", textEdit = { newText = "assert.HTTPBody", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", documentation = "Name returns the name of the running test or benchmark.", filterText = "name", insertTextFormat = 1, kind = 2, label = "t.Name", sortText = "00007", textEdit = { newText = "t.Name", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", documentation = "CoverMode reports what the test coverage mode is set to.", filterText = "name", insertTextFormat = 1, kind = 3, label = "testing.CoverMode", sortText = "00008", textEdit = { newText = "testing.CoverMode", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "string", filterText = "name", insertTextFormat = 1, kind = 21, label = "_Kind_name", sortText = "00012", textEdit = { newText = "_Kind_name", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "string", filterText = "name", insertTextFormat = 1, kind = 21, label = "flagsCollection", sortText = "00013", textEdit = { newText = "flagsCollection", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "struct{...}", filterText = "name", insertTextFormat = 1, kind = 22, label = "args", sortText = "00014", textEdit = { newText = "args", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "*testing.T", filterText = "name", insertTextFormat = 1, kind = 6, label = "t", sortText = "00015", textEdit = { newText = "t", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"github.com/stretchr/testify/assert"', filterText = "name", insertTextFormat = 1, kind = 9, label = "assert", sortText = "00016", textEdit = { newText = "assert", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"context"', filterText = "name", insertTextFormat = 1, kind = 9, label = "context", sortText = "00017", textEdit = { newText = "context", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"reflect"', filterText = "name", insertTextFormat = 1, kind = 9, label = "reflect", sortText = "00018", textEdit = { newText = "reflect", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"sort"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sort", sortText = "00019", textEdit = { newText = "sort", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"testing"', filterText = "name", insertTextFormat = 1, kind = 9, label = "testing", sortText = "00020", textEdit = { newText = "testing", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = '"github.com/globusdigital/feature-toggles/toggle"', filterText = "name", insertTextFormat = 1, kind = 9, label = "toggle", sortText = "00021", textEdit = { newText = "toggle", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "int", filterText = "name", insertTextFormat = 1, kind = 7, label = "Kind", sortText = "00022", textEdit = { newText = "Kind", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "struct{...}", filterText = "name", insertTextFormat = 1, kind = 22, label = "Mem", sortText = "00023", textEdit = { newText = "Mem", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "Kind", filterText = "name", insertTextFormat = 1, kind = 21, label = "MemKind", sortText = "00024", textEdit = { newText = "MemKind", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "struct{...}", filterText = "name", insertTextFormat = 1, kind = 22, label = "Mongo", sortText = "00025", textEdit = { newText = "Mongo", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "Kind", filterText = "name", insertTextFormat = 1, kind = 21, label = "MongoKind", sortText = "00026", textEdit = { newText = "MongoKind", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() *Mem", filterText = "name", insertTextFormat = 1, kind = 3, label = "NewMem", sortText = "00027", textEdit = { newText = "NewMem", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(ctx context.Context, url string) (*Mongo, error)", filterText = "name", insertTextFormat = 1, kind = 3, label = "NewMongo", sortText = "00028", textEdit = { newText = "NewMongo", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMem_Delete", sortText = "00029", textEdit = { newText = "TestMem_Delete", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMem_Get", sortText = "00030", textEdit = { newText = "TestMem_Get", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMem_Save", sortText = "00031", textEdit = { newText = "TestMem_Save", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMongo_Delete", sortText = "00032", textEdit = { newText = "TestMongo_Delete", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMongo_Get", sortText = "00033", textEdit = { newText = "TestMongo_Get", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "name", insertTextFormat = 1, kind = 3, label = "TestMongo_Save", sortText = "00034", textEdit = { newText = "TestMongo_Save", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "[3]uint8", filterText = "name", insertTextFormat = 1, kind = 6, label = "_Kind_index", sortText = "00035", textEdit = { newText = "_Kind_index", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() context.Context", filterText = "name", insertTextFormat = 1, kind = 3, label = "canceledCtx", sortText = "00036", textEdit = { newText = "canceledCtx", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "struct{...}", filterText = "name", insertTextFormat = 1, kind = 22, label = "flag", sortText = "00037", textEdit = { newText = "flag", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "struct{...}", filterText = "name", insertTextFormat = 1, kind = 22, label = "flagKey", sortText = "00038", textEdit = { newText = "flagKey", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T) (string, func())", filterText = "name", insertTextFormat = 1, kind = 3, label = "getTempDB", sortText = "00039", textEdit = { newText = "getTempDB", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "[]toggle.Flag", filterText = "name", insertTextFormat = 1, kind = 6, label = "initialData", sortText = "00040", textEdit = { newText = "initialData", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(slice []Type, elems ...Type) []Type", filterText = "name", insertTextFormat = 1, kind = 3, label = "append", sortText = "00041", textEdit = { newText = "append", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "bool", sortText = "00042", textEdit = { newText = "bool", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "byte", sortText = "00043", textEdit = { newText = "byte", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v Type) int", filterText = "name", insertTextFormat = 1, kind = 3, label = "cap", sortText = "00044", textEdit = { newText = "cap", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c chan<- Type)", filterText = "name", insertTextFormat = 1, kind = 3, label = "close", sortText = "00045", textEdit = { newText = "close", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(r float64, i float64) complex128", filterText = "name", insertTextFormat = 1, kind = 3, label = "complex", sortText = "00046", textEdit = { newText = "complex", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "complex128", sortText = "00047", textEdit = { newText = "complex128", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "complex64", sortText = "00048", textEdit = { newText = "complex64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(dst []Type, src []Type) int", filterText = "name", insertTextFormat = 1, kind = 3, label = "copy", sortText = "00049", textEdit = { newText = "copy", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(m map[Type]Type1, key Type)", filterText = "name", insertTextFormat = 1, kind = 3, label = "delete", sortText = "00050", textEdit = { newText = "delete", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 8, label = "error", sortText = "00051", textEdit = { newText = "error", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 21, label = "false", sortText = "00052", textEdit = { newText = "false", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "float32", sortText = "00053", textEdit = { newText = "float32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "float64", sortText = "00054", textEdit = { newText = "float64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c complex128) float64", filterText = "name", insertTextFormat = 1, kind = 3, label = "imag", sortText = "00055", textEdit = { newText = "imag", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "int", sortText = "00056", textEdit = { newText = "int", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "int16", sortText = "00057", textEdit = { newText = "int16", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "int32", sortText = "00058", textEdit = { newText = "int32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "int64", sortText = "00059", textEdit = { newText = "int64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "int8", sortText = "00060", textEdit = { newText = "int8", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v Type) int", filterText = "name", insertTextFormat = 1, kind = 3, label = "len", sortText = "00061", textEdit = { newText = "len", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t Type, size ...int) Type", filterText = "name", insertTextFormat = 1, kind = 3, label = "make", sortText = "00062", textEdit = { newText = "make", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(Type) *Type", filterText = "name", insertTextFormat = 1, kind = 3, label = "new", sortText = "00063", textEdit = { newText = "new", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v interface{})", filterText = "name", insertTextFormat = 1, kind = 3, label = "panic", sortText = "00064", textEdit = { newText = "panic", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(args ...Type)", filterText = "name", insertTextFormat = 1, kind = 3, label = "print", sortText = "00065", textEdit = { newText = "print", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(args ...Type)", filterText = "name", insertTextFormat = 1, kind = 3, label = "println", sortText = "00066", textEdit = { newText = "println", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c complex128) float64", filterText = "name", insertTextFormat = 1, kind = 3, label = "real", sortText = "00067", textEdit = { newText = "real", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() interface{}", filterText = "name", insertTextFormat = 1, kind = 3, label = "recover", sortText = "00068", textEdit = { newText = "recover", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "rune", sortText = "00069", textEdit = { newText = "rune", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "string", sortText = "00070", textEdit = { newText = "string", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 21, label = "true", sortText = "00071", textEdit = { newText = "true", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uint", sortText = "00072", textEdit = { newText = "uint", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uint16", sortText = "00073", textEdit = { newText = "uint16", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uint32", sortText = "00074", textEdit = { newText = "uint32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uint64", sortText = "00075", textEdit = { newText = "uint64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uint8", sortText = "00076", textEdit = { newText = "uint8", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 7, label = "uintptr", sortText = "00077", textEdit = { newText = "uintptr", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { filterText = "name", insertTextFormat = 1, kind = 6, label = "nil", sortText = "00082", textEdit = { newText = "nil", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/adler32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/adler32"', filterText = "name", insertTextFormat = 1, kind = 9, label = "adler32", sortText = "00083", textEdit = { newText = "adler32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/aes"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/aes"', filterText = "name", insertTextFormat = 1, kind = 9, label = "aes", sortText = "00084", textEdit = { newText = "aes", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/ascii85"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/ascii85"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ascii85", sortText = "00085", textEdit = { newText = "ascii85", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/asn1"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/asn1"', filterText = "name", insertTextFormat = 1, kind = 9, label = "asn1", sortText = "00086", textEdit = { newText = "asn1", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/ast"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/ast"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ast", sortText = "00087", textEdit = { newText = "ast", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'sync/atomic"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"sync/atomic"', filterText = "name", insertTextFormat = 1, kind = 9, label = "atomic", sortText = "00088", textEdit = { newText = "atomic", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/base32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/base32"', filterText = "name", insertTextFormat = 1, kind = 9, label = "base32", sortText = "00089", textEdit = { newText = "base32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/base64"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/base64"', filterText = "name", insertTextFormat = 1, kind = 9, label = "base64", sortText = "00090", textEdit = { newText = "base64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/big"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/big"', filterText = "name", insertTextFormat = 1, kind = 9, label = "big", sortText = "00091", textEdit = { newText = "big", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/binary"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/binary"', filterText = "name", insertTextFormat = 1, kind = 9, label = "binary", sortText = "00092", textEdit = { newText = "binary", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/bits"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/bits"', filterText = "name", insertTextFormat = 1, kind = 9, label = "bits", sortText = "00093", textEdit = { newText = "bits", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'bufio"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"bufio"', filterText = "name", insertTextFormat = 1, kind = 9, label = "bufio", sortText = "00094", textEdit = { newText = "bufio", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/build"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/build"', filterText = "name", insertTextFormat = 1, kind = 9, label = "build", sortText = "00095", textEdit = { newText = "build", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'bytes"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"bytes"', filterText = "name", insertTextFormat = 1, kind = 9, label = "bytes", sortText = "00096", textEdit = { newText = "bytes", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/bzip2"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/bzip2"', filterText = "name", insertTextFormat = 1, kind = 9, label = "bzip2", sortText = "00097", textEdit = { newText = "bzip2", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/cgi"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/cgi"', filterText = "name", insertTextFormat = 1, kind = 9, label = "cgi", sortText = "00098", textEdit = { newText = "cgi", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/cipher"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/cipher"', filterText = "name", insertTextFormat = 1, kind = 9, label = "cipher", sortText = "00099", textEdit = { newText = "cipher", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/cmplx"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/cmplx"', filterText = "name", insertTextFormat = 1, kind = 9, label = "cmplx", sortText = "00100", textEdit = { newText = "cmplx", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/color"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/color"', filterText = "name", insertTextFormat = 1, kind = 9, label = "color", sortText = "00101", textEdit = { newText = "color", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/constant"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/constant"', filterText = "name", insertTextFormat = 1, kind = 9, label = "constant", sortText = "00102", textEdit = { newText = "constant", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/cookiejar"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/cookiejar"', filterText = "name", insertTextFormat = 1, kind = 9, label = "cookiejar", sortText = "00103", textEdit = { newText = "cookiejar", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/crc32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/crc32"', filterText = "name", insertTextFormat = 1, kind = 9, label = "crc32", sortText = "00104", textEdit = { newText = "crc32", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/crc64"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/crc64"', filterText = "name", insertTextFormat = 1, kind = 9, label = "crc64", sortText = "00105", textEdit = { newText = "crc64", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto"', filterText = "name", insertTextFormat = 1, kind = 9, label = "crypto", sortText = "00106", textEdit = { newText = "crypto", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/csv"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/csv"', filterText = "name", insertTextFormat = 1, kind = 9, label = "csv", sortText = "00107", textEdit = { newText = "csv", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/debug"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/debug"', filterText = "name", insertTextFormat = 1, kind = 9, label = "debug", sortText = "00108", textEdit = { newText = "debug", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/des"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/des"', filterText = "name", insertTextFormat = 1, kind = 9, label = "des", sortText = "00109", textEdit = { newText = "des", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/doc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/doc"', filterText = "name", insertTextFormat = 1, kind = 9, label = "doc", sortText = "00110", textEdit = { newText = "doc", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/draw"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/draw"', filterText = "name", insertTextFormat = 1, kind = 9, label = "draw", sortText = "00111", textEdit = { newText = "draw", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'database/sql/driver"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"database/sql/driver"', filterText = "name", insertTextFormat = 1, kind = 9, label = "driver", sortText = "00112", textEdit = { newText = "driver", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/dsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/dsa"', filterText = "name", insertTextFormat = 1, kind = 9, label = "dsa", sortText = "00113", textEdit = { newText = "dsa", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/dwarf"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/dwarf"', filterText = "name", insertTextFormat = 1, kind = 9, label = "dwarf", sortText = "00114", textEdit = { newText = "dwarf", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/ecdsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/ecdsa"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ecdsa", sortText = "00115", textEdit = { newText = "ecdsa", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/ed25519"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/ed25519"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ed25519", sortText = "00116", textEdit = { newText = "ed25519", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/elf"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/elf"', filterText = "name", insertTextFormat = 1, kind = 9, label = "elf", sortText = "00117", textEdit = { newText = "elf", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/elliptic"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/elliptic"', filterText = "name", insertTextFormat = 1, kind = 9, label = "elliptic", sortText = "00118", textEdit = { newText = "elliptic", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding"', filterText = "name", insertTextFormat = 1, kind = 9, label = "encoding", sortText = "00119", textEdit = { newText = "encoding", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'errors"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"errors"', filterText = "name", insertTextFormat = 1, kind = 9, label = "errors", sortText = "00120", textEdit = { newText = "errors", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/exec"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/exec"', filterText = "name", insertTextFormat = 1, kind = 9, label = "exec", sortText = "00121", textEdit = { newText = "exec", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'expvar"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"expvar"', filterText = "name", insertTextFormat = 1, kind = 9, label = "expvar", sortText = "00122", textEdit = { newText = "expvar", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/fcgi"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/fcgi"', filterText = "name", insertTextFormat = 1, kind = 9, label = "fcgi", sortText = "00123", textEdit = { newText = "fcgi", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'path/filepath"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"path/filepath"', filterText = "name", insertTextFormat = 1, kind = 9, label = "filepath", sortText = "00124", textEdit = { newText = "filepath", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/flate"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/flate"', filterText = "name", insertTextFormat = 1, kind = 9, label = "flate", sortText = "00125", textEdit = { newText = "flate", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'fmt"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"fmt"', filterText = "name", insertTextFormat = 1, kind = 9, label = "fmt", sortText = "00126", textEdit = { newText = "fmt", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/fnv"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/fnv"', filterText = "name", insertTextFormat = 1, kind = 9, label = "fnv", sortText = "00127", textEdit = { newText = "fnv", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/format"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/format"', filterText = "name", insertTextFormat = 1, kind = 9, label = "format", sortText = "00128", textEdit = { newText = "format", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/gif"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/gif"', filterText = "name", insertTextFormat = 1, kind = 9, label = "gif", sortText = "00129", textEdit = { newText = "gif", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/gob"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/gob"', filterText = "name", insertTextFormat = 1, kind = 9, label = "gob", sortText = "00130", textEdit = { newText = "gob", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/gosym"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/gosym"', filterText = "name", insertTextFormat = 1, kind = 9, label = "gosym", sortText = "00131", textEdit = { newText = "gosym", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/gzip"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/gzip"', filterText = "name", insertTextFormat = 1, kind = 9, label = "gzip", sortText = "00132", textEdit = { newText = "gzip", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash"', filterText = "name", insertTextFormat = 1, kind = 9, label = "hash", sortText = "00133", textEdit = { newText = "hash", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/heap"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/heap"', filterText = "name", insertTextFormat = 1, kind = 9, label = "heap", sortText = "00134", textEdit = { newText = "heap", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/hex"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/hex"', filterText = "name", insertTextFormat = 1, kind = 9, label = "hex", sortText = "00135", textEdit = { newText = "hex", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/hmac"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/hmac"', filterText = "name", insertTextFormat = 1, kind = 9, label = "hmac", sortText = "00136", textEdit = { newText = "hmac", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'html"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"html"', filterText = "name", insertTextFormat = 1, kind = 9, label = "html", sortText = "00137", textEdit = { newText = "html", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http"', filterText = "name", insertTextFormat = 1, kind = 9, label = "http", sortText = "00138", textEdit = { newText = "http", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httptest"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httptest"', filterText = "name", insertTextFormat = 1, kind = 9, label = "httptest", sortText = "00139", textEdit = { newText = "httptest", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httptrace"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httptrace"', filterText = "name", insertTextFormat = 1, kind = 9, label = "httptrace", sortText = "00140", textEdit = { newText = "httptrace", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httputil"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httputil"', filterText = "name", insertTextFormat = 1, kind = 9, label = "httputil", sortText = "00141", textEdit = { newText = "httputil", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image"', filterText = "name", insertTextFormat = 1, kind = 9, label = "image", sortText = "00142", textEdit = { newText = "image", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/importer"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/importer"', filterText = "name", insertTextFormat = 1, kind = 9, label = "importer", sortText = "00143", textEdit = { newText = "importer", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'io"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"io"', filterText = "name", insertTextFormat = 1, kind = 9, label = "io", sortText = "00144", textEdit = { newText = "io", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"testing/iotest"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"testing/iotest"', filterText = "name", insertTextFormat = 1, kind = 9, label = "iotest", sortText = "00145", textEdit = { newText = "iotest", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'io/ioutil"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"io/ioutil"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ioutil", sortText = "00146", textEdit = { newText = "ioutil", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/jpeg"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/jpeg"', filterText = "name", insertTextFormat = 1, kind = 9, label = "jpeg", sortText = "00147", textEdit = { newText = "jpeg", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'syscall/js"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"syscall/js"', filterText = "name", insertTextFormat = 1, kind = 9, label = "js", sortText = "00148", textEdit = { newText = "js", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/json"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/json"', filterText = "name", insertTextFormat = 1, kind = 9, label = "json", sortText = "00149", textEdit = { newText = "json", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/rpc/jsonrpc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/rpc/jsonrpc"', filterText = "name", insertTextFormat = 1, kind = 9, label = "jsonrpc", sortText = "00150", textEdit = { newText = "jsonrpc", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/list"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/list"', filterText = "name", insertTextFormat = 1, kind = 9, label = "list", sortText = "00151", textEdit = { newText = "list", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'log"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"log"', filterText = "name", insertTextFormat = 1, kind = 9, label = "log", sortText = "00152", textEdit = { newText = "log", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/lzw"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/lzw"', filterText = "name", insertTextFormat = 1, kind = 9, label = "lzw", sortText = "00153", textEdit = { newText = "lzw", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/macho"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/macho"', filterText = "name", insertTextFormat = 1, kind = 9, label = "macho", sortText = "00154", textEdit = { newText = "macho", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/mail"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/mail"', filterText = "name", insertTextFormat = 1, kind = 9, label = "mail", sortText = "00155", textEdit = { newText = "mail", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'math"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math"', filterText = "name", insertTextFormat = 1, kind = 9, label = "math", sortText = "00156", textEdit = { newText = "math", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/md5"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/md5"', filterText = "name", insertTextFormat = 1, kind = 9, label = "md5", sortText = "00157", textEdit = { newText = "md5", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime"', filterText = "name", insertTextFormat = 1, kind = 9, label = "mime", sortText = "00158", textEdit = { newText = "mime", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime/multipart"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime/multipart"', filterText = "name", insertTextFormat = 1, kind = 9, label = "multipart", sortText = "00159", textEdit = { newText = "multipart", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net"', filterText = "name", insertTextFormat = 1, kind = 9, label = "net", sortText = "00160", textEdit = { newText = "net", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'os"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os"', filterText = "name", insertTextFormat = 1, kind = 9, label = "os", sortText = "00161", textEdit = { newText = "os", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/color/palette"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/color/palette"', filterText = "name", insertTextFormat = 1, kind = 9, label = "palette", sortText = "00162", textEdit = { newText = "palette", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/template/parse"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/template/parse"', filterText = "name", insertTextFormat = 1, kind = 9, label = "parse", sortText = "00163", textEdit = { newText = "parse", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/parser"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/parser"', filterText = "name", insertTextFormat = 1, kind = 9, label = "parser", sortText = "00164", textEdit = { newText = "parser", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'path"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"path"', filterText = "name", insertTextFormat = 1, kind = 9, label = "path", sortText = "00165", textEdit = { newText = "path", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/pe"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/pe"', filterText = "name", insertTextFormat = 1, kind = 9, label = "pe", sortText = "00166", textEdit = { newText = "pe", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/pem"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/pem"', filterText = "name", insertTextFormat = 1, kind = 9, label = "pem", sortText = "00167", textEdit = { newText = "pem", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/x509/pkix"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/x509/pkix"', filterText = "name", insertTextFormat = 1, kind = 9, label = "pkix", sortText = "00168", textEdit = { newText = "pkix", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/plan9obj"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/plan9obj"', filterText = "name", insertTextFormat = 1, kind = 9, label = "plan9obj", sortText = "00169", textEdit = { newText = "plan9obj", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'plugin"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"plugin"', filterText = "name", insertTextFormat = 1, kind = 9, label = "plugin", sortText = "00170", textEdit = { newText = "plugin", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/png"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/png"', filterText = "name", insertTextFormat = 1, kind = 9, label = "png", sortText = "00171", textEdit = { newText = "png", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/pprof"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/pprof"', filterText = "name", insertTextFormat = 1, kind = 9, label = "pprof", sortText = "00172", textEdit = { newText = "pprof", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/pprof"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/pprof"', filterText = "name", insertTextFormat = 1, kind = 9, label = "pprof", sortText = "00173", textEdit = { newText = "pprof", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/printer"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/printer"', filterText = "name", insertTextFormat = 1, kind = 9, label = "printer", sortText = "00174", textEdit = { newText = "printer", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"testing/quick"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"testing/quick"', filterText = "name", insertTextFormat = 1, kind = 9, label = "quick", sortText = "00175", textEdit = { newText = "quick", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime/quotedprintable"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime/quotedprintable"', filterText = "name", insertTextFormat = 1, kind = 9, label = "quotedprintable", sortText = "00176", textEdit = { newText = "quotedprintable", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/rand"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/rand"', filterText = "name", insertTextFormat = 1, kind = 9, label = "rand", sortText = "00177", textEdit = { newText = "rand", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rand"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rand"', filterText = "name", insertTextFormat = 1, kind = 9, label = "rand", sortText = "00178", textEdit = { newText = "rand", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rc4"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rc4"', filterText = "name", insertTextFormat = 1, kind = 9, label = "rc4", sortText = "00179", textEdit = { newText = "rc4", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'regexp"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"regexp"', filterText = "name", insertTextFormat = 1, kind = 9, label = "regexp", sortText = "00180", textEdit = { newText = "regexp", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/ring"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/ring"', filterText = "name", insertTextFormat = 1, kind = 9, label = "ring", sortText = "00181", textEdit = { newText = "ring", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/rpc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/rpc"', filterText = "name", insertTextFormat = 1, kind = 9, label = "rpc", sortText = "00182", textEdit = { newText = "rpc", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rsa"', filterText = "name", insertTextFormat = 1, kind = 9, label = "rsa", sortText = "00183", textEdit = { newText = "rsa", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime"', filterText = "name", insertTextFormat = 1, kind = 9, label = "runtime", sortText = "00184", textEdit = { newText = "runtime", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/scanner"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/scanner"', filterText = "name", insertTextFormat = 1, kind = 9, label = "scanner", sortText = "00185", textEdit = { newText = "scanner", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/scanner"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/scanner"', filterText = "name", insertTextFormat = 1, kind = 9, label = "scanner", sortText = "00186", textEdit = { newText = "scanner", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha1"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha1"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sha1", sortText = "00187", textEdit = { newText = "sha1", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha256"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha256"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sha256", sortText = "00188", textEdit = { newText = "sha256", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha512"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha512"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sha512", sortText = "00189", textEdit = { newText = "sha512", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/signal"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/signal"', filterText = "name", insertTextFormat = 1, kind = 9, label = "signal", sortText = "00190", textEdit = { newText = "signal", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/smtp"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/smtp"', filterText = "name", insertTextFormat = 1, kind = 9, label = "smtp", sortText = "00191", textEdit = { newText = "smtp", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'database/sql"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"database/sql"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sql", sortText = "00192", textEdit = { newText = "sql", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'strconv"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"strconv"', filterText = "name", insertTextFormat = 1, kind = 9, label = "strconv", sortText = "00193", textEdit = { newText = "strconv", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'strings"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"strings"', filterText = "name", insertTextFormat = 1, kind = 9, label = "strings", sortText = "00194", textEdit = { newText = "strings", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/subtle"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/subtle"', filterText = "name", insertTextFormat = 1, kind = 9, label = "subtle", sortText = "00195", textEdit = { newText = "subtle", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'index/suffixarray"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"index/suffixarray"', filterText = "name", insertTextFormat = 1, kind = 9, label = "suffixarray", sortText = "00196", textEdit = { newText = "suffixarray", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'sync"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"sync"', filterText = "name", insertTextFormat = 1, kind = 9, label = "sync", sortText = "00197", textEdit = { newText = "sync", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'regexp/syntax"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"regexp/syntax"', filterText = "name", insertTextFormat = 1, kind = 9, label = "syntax", sortText = "00198", textEdit = { newText = "syntax", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'syscall"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"syscall"', filterText = "name", insertTextFormat = 1, kind = 9, label = "syscall", sortText = "00199", textEdit = { newText = "syscall", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'log/syslog"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"log/syslog"', filterText = "name", insertTextFormat = 1, kind = 9, label = "syslog", sortText = "00200", textEdit = { newText = "syslog", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/tabwriter"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/tabwriter"', filterText = "name", insertTextFormat = 1, kind = 9, label = "tabwriter", sortText = "00201", textEdit = { newText = "tabwriter", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'archive/tar"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"archive/tar"', filterText = "name", insertTextFormat = 1, kind = 9, label = "tar", sortText = "00202", textEdit = { newText = "tar", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/template"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/template"', filterText = "name", insertTextFormat = 1, kind = 9, label = "template", sortText = "00203", textEdit = { newText = "template", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'html/template"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"html/template"', filterText = "name", insertTextFormat = 1, kind = 9, label = "template", sortText = "00204", textEdit = { newText = "template", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/textproto"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/textproto"', filterText = "name", insertTextFormat = 1, kind = 9, label = "textproto", sortText = "00205", textEdit = { newText = "textproto", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"time"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"time"', filterText = "name", insertTextFormat = 1, kind = 9, label = "time", sortText = "00206", textEdit = { newText = "time", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/tls"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/tls"', filterText = "name", insertTextFormat = 1, kind = 9, label = "tls", sortText = "00207", textEdit = { newText = "tls", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/token"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/token"', filterText = "name", insertTextFormat = 1, kind = 9, label = "token", sortText = "00208", textEdit = { newText = "token", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/trace"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/trace"', filterText = "name", insertTextFormat = 1, kind = 9, label = "trace", sortText = "00209", textEdit = { newText = "trace", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/types"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/types"', filterText = "name", insertTextFormat = 1, kind = 9, label = "types", sortText = "00210", textEdit = { newText = "types", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode"', filterText = "name", insertTextFormat = 1, kind = 9, label = "unicode", sortText = "00211", textEdit = { newText = "unicode", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unsafe"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unsafe"', filterText = "name", insertTextFormat = 1, kind = 9, label = "unsafe", sortText = "00212", textEdit = { newText = "unsafe", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/url"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/url"', filterText = "name", insertTextFormat = 1, kind = 9, label = "url", sortText = "00213", textEdit = { newText = "url", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/user"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/user"', filterText = "name", insertTextFormat = 1, kind = 9, label = "user", sortText = "00214", textEdit = { newText = "user", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode/utf16"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode/utf16"', filterText = "name", insertTextFormat = 1, kind = 9, label = "utf16", sortText = "00215", textEdit = { newText = "utf16", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode/utf8"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode/utf8"', filterText = "name", insertTextFormat = 1, kind = 9, label = "utf8", sortText = "00216", textEdit = { newText = "utf8", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/x509"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/x509"', filterText = "name", insertTextFormat = 1, kind = 9, label = "x509", sortText = "00217", textEdit = { newText = "x509", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/xml"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/xml"', filterText = "name", insertTextFormat = 1, kind = 9, label = "xml", sortText = "00218", textEdit = { newText = "xml", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'archive/zip"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"archive/zip"', filterText = "name", insertTextFormat = 1, kind = 9, label = "zip", sortText = "00219", textEdit = { newText = "zip", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/zlib"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/zlib"', filterText = "name", insertTextFormat = 1, kind = 9, label = "zlib", sortText = "00220", textEdit = { newText = "zlib", range = { end = { character = 3, line = 40 }, start = { character = 3, line = 40 } } } } } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 180 40 41 41 5 5 5 { "\t\t{a}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 180 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 180 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 5, line = 40 }, start = { character = 5, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 180 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 5, line = 40 }, start = { character = 5, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 180}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 5, line = 40 }, start = { character = 5, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 180 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 181 40 41 41 6 6 6 { "\t\t{an}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 181 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 181 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 6, line = 40 }, start = { character = 6, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 181 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 6, line = 40 }, start = { character = 6, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 181}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 6, line = 40 }, start = { character = 6, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 181 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 5, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 47, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 5, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 182 40 41 41 13 13 13 { "\t\t{ane}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 182 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 182 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 47, jsonrpc = "2.0", result = { isIncomplete = true, items = { { detail = "string", filterText = "args.serviceName", insertTextFormat = 1, kind = 5, label = "args.serviceName", preselect = true, sortText = "00000", textEdit = { newText = "args.serviceName", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", filterText = "args.serviceName", insertTextFormat = 1, kind = 2, label = "assert.AnError.Error", sortText = "00001", textEdit = { newText = "assert.AnError.Error", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", filterText = "args.serviceName", insertTextFormat = 1, kind = 2, label = "toggle.AndOp.String", sortText = "00002", textEdit = { newText = "toggle.AndOp.String", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(slice []Type, elems ...Type) []Type", filterText = "args.serviceName", insertTextFormat = 1, kind = 3, label = "append", sortText = "00006", textEdit = { newText = "append", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'ChimeraCoder/anaconda"\n\t"github.com/', range = { end = { character = 13, line = 8 }, start = { character = 13, line = 8 } } } }, detail = '"github.com/ChimeraCoder/anaconda"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "anaconda", sortText = "00010", textEdit = { newText = "anaconda", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"golang.org/x/tools/go/analysis"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"golang.org/x/tools/go/analysis"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysis", sortText = "00011", textEdit = { newText = "analysis", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"golang.org/x/tools/godoc/analysis"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"golang.org/x/tools/godoc/analysis"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysis", sortText = "00012", textEdit = { newText = "analysis", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'blevesearch/bleve/analysis"\n\t"github.com/', range = { end = { character = 13, line = 8 }, start = { character = 13, line = 8 } } } }, detail = '"github.com/blevesearch/bleve/analysis"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysis", sortText = "00013", textEdit = { newText = "analysis", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'gopherjs/gopherjs/compiler/analysis"\n\t"github.com/', range = { end = { character = 13, line = 9 }, start = { character = 13, line = 9 } } } }, detail = '"github.com/gopherjs/gopherjs/compiler/analysis"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysis", sortText = "00014", textEdit = { newText = "analysis", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'go-openapi/analysis"\n\t"github.com/', range = { end = { character = 13, line = 9 }, start = { character = 13, line = 9 } } } }, detail = '"github.com/go-openapi/analysis"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysis", sortText = "00015", textEdit = { newText = "analysis", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"golang.org/x/tools/go/analysis/analysistest"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"golang.org/x/tools/go/analysis/analysistest"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analysistest", sortText = "00016", textEdit = { newText = "analysistest", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/analytics/v3"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/analytics/v3"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analytics", sortText = "00017", textEdit = { newText = "analytics", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/analyticsreporting/v4"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/analyticsreporting/v4"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "analyticsreporting", sortText = "00018", textEdit = { newText = "analyticsreporting", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androiddeviceprovisioning/v1"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androiddeviceprovisioning/v1"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androiddeviceprovisioning", sortText = "00019", textEdit = { newText = "androiddeviceprovisioning", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androidenterprise/v1"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androidenterprise/v1"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androidenterprise", sortText = "00020", textEdit = { newText = "androidenterprise", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androidmanagement/v1"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androidmanagement/v1"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androidmanagement", sortText = "00021", textEdit = { newText = "androidmanagement", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androidpublisher/v3"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androidpublisher/v3"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androidpublisher", sortText = "00022", textEdit = { newText = "androidpublisher", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androidpublisher/v1"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androidpublisher/v1"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androidpublisher", sortText = "00023", textEdit = { newText = "androidpublisher", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/api/androidpublisher/v2"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/api/androidpublisher/v2"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "androidpublisher", sortText = "00024", textEdit = { newText = "androidpublisher", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"google.golang.org/genproto/googleapis/api/annotations"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"google.golang.org/genproto/googleapis/api/annotations"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "annotations", sortText = "00025", textEdit = { newText = "annotations", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"k8s.io/apimachinery/pkg/apimachinery/announced"\n', range = { end = { character = 0, line = 10 }, start = { character = 0, line = 10 } } } }, detail = '"k8s.io/apimachinery/pkg/apimachinery/announced"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "announced", sortText = "00026", textEdit = { newText = "announced", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'blevesearch/bleve/search/highlight/format/ansi"\n\t"github.com/', range = { end = { character = 13, line = 8 }, start = { character = 13, line = 8 } } } }, detail = '"github.com/blevesearch/bleve/search/highlight/format/ansi"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "ansi", sortText = "00027", textEdit = { newText = "ansi", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'damore/tcell/terminfo/a/ansi"\n\t"github.com/g', range = { end = { character = 14, line = 8 }, start = { character = 14, line = 8 } } } }, detail = '"github.com/gdamore/tcell/terminfo/a/ansi"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "ansi", sortText = "00028", textEdit = { newText = "ansi", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'blevesearch/bleve/search/highlight/highlighter/ansi"\n\t"github.com/', range = { end = { character = 13, line = 8 }, start = { character = 13, line = 8 } } } }, detail = '"github.com/blevesearch/bleve/search/highlight/highlighter/ansi"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "ansi", sortText = "00029", textEdit = { newText = "ansi", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } }, { additionalTextEdits = { { newText = 'golang/protobuf/ptypes/any"\n\t"github.com/', range = { end = { character = 13, line = 9 }, start = { character = 13, line = 9 } } } }, detail = '"github.com/golang/protobuf/ptypes/any"', filterText = "args.serviceName", insertTextFormat = 1, kind = 9, label = "any", sortText = "00030", textEdit = { newText = "any", range = { end = { character = 5, line = 40 }, start = { character = 3, line = 40 } } } } } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 7, line = 40 }, start = { character = 7, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 182 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 7, line = 40 }, start = { character = 7, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 182}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 7, line = 40 }, start = { character = 7, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 182 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 6, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 48, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 6, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 6, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 49, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 6, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 48, jsonrpc = "2.0", result = { isIncomplete = true, items = { { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 2, label = "assert.AnError.Error", preselect = true, sortText = "00000", textEdit = { newText = "assert.AnError.Error", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "string", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 5, label = "args.serviceName", sortText = "00001", textEdit = { newText = "args.serviceName", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "error", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 6, label = "assert.AnError", sortText = "00002", textEdit = { newText = "assert.AnError", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } } } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 49, jsonrpc = "2.0", result = { isIncomplete = true, items = { { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() string", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 2, label = "assert.AnError.Error", preselect = true, sortText = "00000", textEdit = { newText = "assert.AnError.Error", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "string", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 5, label = "args.serviceName", sortText = "00001", textEdit = { newText = "args.serviceName", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } }, { detail = "error", filterText = "assert.AnError.Error", insertTextFormat = 1, kind = 6, label = "assert.AnError", sortText = "00002", textEdit = { newText = "assert.AnError", range = { end = { character = 6, line = 40 }, start = { character = 3, line = 40 } } } } } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 183 40 41 41 8 8 8 { "\t\t{anem}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 183 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 183 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 184 40 41 41 9 9 9 { "\t\t{ane}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 184 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 184 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 185 40 41 41 8 8 8 { "\t\t{an}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 185 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 185 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 186 40 41 41 7 7 7 { "\t\t{a}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 186 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 186 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 187 40 41 41 6 6 6 { "\t\t{}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 187 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 187 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 188 40 41 41 5 5 5 { "\t\t{a}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 188 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{a}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 188 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 189 40 41 41 6 6 6 { "\t\t{an}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 189 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{an}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 189 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 190 40 41 41 7 7 7 { "\t\t{ane}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 190 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{ane}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 190 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 191 40 41 41 8 8 8 { "\t\t{anem}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 191 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 191 } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 191 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 191}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "missing ',' before newline in composite literal", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 191 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 7, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 50, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 7, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 50, jsonrpc = "2.0", result = { isIncomplete = true, items = { { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t TestingT, object interface{}, msgAndArgs ...interface{}) bool", documentation = "NotEmpty asserts that the specified object is NOT empty.", filterText = "assert.NotEmpty", insertTextFormat = 1, kind = 3, label = "assert.NotEmpty", preselect = true, sortText = "00000", textEdit = { newText = "assert.NotEmpty", range = { end = { character = 7, line = 40 }, start = { character = 3, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t TestingT, object interface{}, msg string, args ...interface{}) bool", documentation = "NotEmptyf asserts that the specified object is NOT empty.", filterText = "assert.NotEmpty", insertTextFormat = 1, kind = 3, label = "assert.NotEmptyf", sortText = "00001", textEdit = { newText = "assert.NotEmptyf", range = { end = { character = 7, line = 40 }, start = { character = 3, line = 40 } } } } } }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 192 40 41 41 9 9 9 { "\t\t{anem:}" }
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem:}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 192 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem:}\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 192 } }}
[ ERROR ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:308 ] "rpc" "gopls" "stderr" "2020/02/23 20:18:34 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found\n"
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "window/logMessage", params = { message = "2020/02/23 20:18:34 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1 }}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "window/logMessage" { message = "2020/02/23 20:18:34 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1}
[ DEBUG ] 2020-02-23T20:18:34Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "window/logMessage" { client_id = 1, params = { message = "2020/02/23 20:18:34 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1 }}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 192 }}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 192}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 8, line = 40 }, start = { character = 8, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 192 }}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:607 ] "on_lines" 1 193 40 41 41 10 10 10 { "\t\t{anem: }" }
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:269 ] "rpc.notify" "textDocument/didChange" { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem: }\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 193 }}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { text = 'package storage\n\nimport (\n\t"context"\n\t"reflect"\n\t"sort"\n\t"testing"\n\n\t"github.com/globusdigital/feature-toggles/toggle"\n\t"github.com/stretchr/testify/assert"\n)\n\nvar initialData = []toggle.Flag{\n\t{Name: "n1", ServiceName: "svc1", RawValue: "t", Value: true},\n\t{Name: "n2", ServiceName: "svc1", RawValue: "0"},\n\t{Name: "n3", ServiceName: "svc2", RawValue: "1", Value: true},\n\t{Name: "n4", ServiceName: "", RawValue: "some data"},\n\t{Name: "n5", ServiceName: "", RawValue: "y", Value: true},\n}\n\nfunc TestMem_Get(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tserviceName string\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\twant []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background()}},\n\t\t{name: "no data - svc", args: args{ctx: context.Background(), serviceName: "svc1"}},\n\t\t{name: "data", args: args{ctx: context.Background()}, initial: initialData, want: initialData},\n\t\t{name: "data - svc1", args: args{ctx: context.Background(), serviceName: "svc1"}, initial: initialData, want: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[3], initialData[4],\n\t\t}},\n\t\t{name: "data - svc2", args: args{ctx: context.Background(), serviceName: "svc2"}, initial: initialData, want: initialData[2:]},\n\t\t{anem: }\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\tgot, err := s.Get(tt.args.ctx, tt.args.serviceName)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsort.Slice(got, func(i, j int) bool {\n\t\t\t\treturn got[i].Name < got[j].Name\n\t\t\t})\n\t\t\ta.Equal(tt.want, got)\n\t\t})\n\t}\n}\n\nfunc TestMem_Save(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t\tinitial bool\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData}, expected: initialData},\n\t\t{name: "save data after initial", args: args{ctx: context.Background(), flags: []toggle.Flag{\n\t\t\t{Name: "n2", ServiceName: "svc1", RawValue: "1", Value: true},\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}, initial: true}, initial: initialData, expected: []toggle.Flag{\n\t\t\tinitialData[0], initialData[1], initialData[2], initialData[3], initialData[4],\n\t\t\t{Name: "n3", ServiceName: "svc1", RawValue: "0"},\n\t\t}},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Save(tt.args.ctx, tt.args.flags, tt.args.initial)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestMem_Delete(t *testing.T) {\n\ttype args struct {\n\t\tctx context.Context\n\t\tflags []toggle.Flag\n\t}\n\ttests := []struct {\n\t\tname string\n\t\targs args\n\t\tinitial []toggle.Flag\n\t\texpected []toggle.Flag\n\t\twantErr bool\n\t}{\n\t\t{name: "canceled ctx", args: args{ctx: canceledCtx()}, wantErr: true},\n\t\t{name: "no data", args: args{ctx: context.Background(), flags: initialData[3:]}, expected: nil},\n\t\t{name: "save data", args: args{ctx: context.Background(), flags: initialData[3:]}, initial: initialData, expected: initialData[:3]},\n\t}\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\ta := assert.New(t)\n\t\t\ts := NewMem()\n\n\t\t\tif tt.initial != nil {\n\t\t\t\terr := s.Save(context.Background(), tt.initial, false)\n\t\t\t\ta.NoError(err)\n\t\t\t}\n\n\t\t\terr := s.Delete(tt.args.ctx, tt.args.flags)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf("Mem.Get() error = %v, wantErr %v", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\ta.Len(s.data, len(tt.expected))\n\n\t\t\tfor _, v := range s.data {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, e := range tt.expected {\n\t\t\t\t\tif reflect.DeepEqual(e, v) {\n\t\t\t\t\t\tfound = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ta.True(found, "expected %#v", v)\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc canceledCtx() context.Context {\n\tctx, cancel := context.WithCancel(context.Background())\n\tcancel()\n\n\treturn ctx\n}\n' } }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 193 } }}
[ ERROR ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:308 ] "rpc" "gopls" "stderr" "2020/02/23 20:18:35 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found\n"
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "window/logMessage", params = { message = "2020/02/23 20:18:35 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1 }}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "window/logMessage" { message = "2020/02/23 20:18:35 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1}
[ DEBUG ] 2020-02-23T20:18:35Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "window/logMessage" { client_id = 1, params = { message = "2020/02/23 20:18:35 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no defer or go statement found", type = 1 }}
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 193 }}
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:367 ] "notification" "textDocument/publishDiagnostics" { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 193}
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/callbacks.lua:222 ] "default_callback" "textDocument/publishDiagnostics" { client_id = 1, params = { diagnostics = { { message = "expected operand, found '}'", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } }, severity = 1, source = "syntax" } }, uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go", version = 193 }}
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp.lua:528 ] "LSP[gopls]" "client.request" 1 "textDocument/completion" { position = { character = 9, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" }} <function 1>
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:258 ] "rpc.send.payload" { id = 51, jsonrpc = "2.0", method = "textDocument/completion", params = { position = { character = 9, line = 40 }, textDocument = { uri = "file:///home/urandom/Projects/feature-toggles/storage/mem_test.go" } }}
[ DEBUG ] 2020-02-23T20:18:36Z+0100 ] /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:338 ] "decoded" { id = 51, jsonrpc = "2.0", result = { isIncomplete = true, items = { { detail = "struct{...}", filterText = "args", insertTextFormat = 1, kind = 22, label = "args", preselect = true, sortText = "00000", textEdit = { newText = "args", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "*testing.T", filterText = "args", insertTextFormat = 1, kind = 6, label = "t", sortText = "00001", textEdit = { newText = "t", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"github.com/stretchr/testify/assert"', filterText = "args", insertTextFormat = 1, kind = 9, label = "assert", sortText = "00002", textEdit = { newText = "assert", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"context"', filterText = "args", insertTextFormat = 1, kind = 9, label = "context", sortText = "00003", textEdit = { newText = "context", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"reflect"', filterText = "args", insertTextFormat = 1, kind = 9, label = "reflect", sortText = "00004", textEdit = { newText = "reflect", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"sort"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sort", sortText = "00005", textEdit = { newText = "sort", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"testing"', filterText = "args", insertTextFormat = 1, kind = 9, label = "testing", sortText = "00006", textEdit = { newText = "testing", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = '"github.com/globusdigital/feature-toggles/toggle"', filterText = "args", insertTextFormat = 1, kind = 9, label = "toggle", sortText = "00007", textEdit = { newText = "toggle", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "int", filterText = "args", insertTextFormat = 1, kind = 7, label = "Kind", sortText = "00008", textEdit = { newText = "Kind", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "struct{...}", filterText = "args", insertTextFormat = 1, kind = 22, label = "Mem", sortText = "00009", textEdit = { newText = "Mem", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "Kind", filterText = "args", insertTextFormat = 1, kind = 21, label = "MemKind", sortText = "00010", textEdit = { newText = "MemKind", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "struct{...}", filterText = "args", insertTextFormat = 1, kind = 22, label = "Mongo", sortText = "00011", textEdit = { newText = "Mongo", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "Kind", filterText = "args", insertTextFormat = 1, kind = 21, label = "MongoKind", sortText = "00012", textEdit = { newText = "MongoKind", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() *Mem", filterText = "args", insertTextFormat = 1, kind = 3, label = "NewMem", sortText = "00013", textEdit = { newText = "NewMem", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(ctx context.Context, url string) (*Mongo, error)", filterText = "args", insertTextFormat = 1, kind = 3, label = "NewMongo", sortText = "00014", textEdit = { newText = "NewMongo", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "args", insertTextFormat = 1, kind = 3, label = "TestMem_Get", sortText = "00015", textEdit = { newText = "TestMem_Get", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "args", insertTextFormat = 1, kind = 3, label = "TestMongo_Delete", sortText = "00016", textEdit = { newText = "TestMongo_Delete", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "args", insertTextFormat = 1, kind = 3, label = "TestMongo_Get", sortText = "00017", textEdit = { newText = "TestMongo_Get", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T)", filterText = "args", insertTextFormat = 1, kind = 3, label = "TestMongo_Save", sortText = "00018", textEdit = { newText = "TestMongo_Save", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "[3]uint8", filterText = "args", insertTextFormat = 1, kind = 6, label = "_Kind_index", sortText = "00019", textEdit = { newText = "_Kind_index", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "string", filterText = "args", insertTextFormat = 1, kind = 21, label = "_Kind_name", sortText = "00020", textEdit = { newText = "_Kind_name", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() context.Context", filterText = "args", insertTextFormat = 1, kind = 3, label = "canceledCtx", sortText = "00021", textEdit = { newText = "canceledCtx", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "struct{...}", filterText = "args", insertTextFormat = 1, kind = 22, label = "flag", sortText = "00022", textEdit = { newText = "flag", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "struct{...}", filterText = "args", insertTextFormat = 1, kind = 22, label = "flagKey", sortText = "00023", textEdit = { newText = "flagKey", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "string", filterText = "args", insertTextFormat = 1, kind = 21, label = "flagsCollection", sortText = "00024", textEdit = { newText = "flagsCollection", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t *testing.T) (string, func())", filterText = "args", insertTextFormat = 1, kind = 3, label = "getTempDB", sortText = "00025", textEdit = { newText = "getTempDB", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "[]toggle.Flag", filterText = "args", insertTextFormat = 1, kind = 6, label = "initialData", sortText = "00026", textEdit = { newText = "initialData", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { detail = "string", filterText = "args", insertTextFormat = 1, kind = 6, label = "mongoURL", sortText = "00027", textEdit = { newText = "mongoURL", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(slice []Type, elems ...Type) []Type", filterText = "args", insertTextFormat = 1, kind = 3, label = "append", sortText = "00028", textEdit = { newText = "append", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "bool", sortText = "00029", textEdit = { newText = "bool", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "byte", sortText = "00030", textEdit = { newText = "byte", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v Type) int", filterText = "args", insertTextFormat = 1, kind = 3, label = "cap", sortText = "00031", textEdit = { newText = "cap", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c chan<- Type)", filterText = "args", insertTextFormat = 1, kind = 3, label = "close", sortText = "00032", textEdit = { newText = "close", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(r float64, i float64) complex128", filterText = "args", insertTextFormat = 1, kind = 3, label = "complex", sortText = "00033", textEdit = { newText = "complex", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "complex128", sortText = "00034", textEdit = { newText = "complex128", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "complex64", sortText = "00035", textEdit = { newText = "complex64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(dst []Type, src []Type) int", filterText = "args", insertTextFormat = 1, kind = 3, label = "copy", sortText = "00036", textEdit = { newText = "copy", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(m map[Type]Type1, key Type)", filterText = "args", insertTextFormat = 1, kind = 3, label = "delete", sortText = "00037", textEdit = { newText = "delete", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 8, label = "error", sortText = "00038", textEdit = { newText = "error", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 21, label = "false", sortText = "00039", textEdit = { newText = "false", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "float32", sortText = "00040", textEdit = { newText = "float32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "float64", sortText = "00041", textEdit = { newText = "float64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c complex128) float64", filterText = "args", insertTextFormat = 1, kind = 3, label = "imag", sortText = "00042", textEdit = { newText = "imag", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "int", sortText = "00043", textEdit = { newText = "int", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "int16", sortText = "00044", textEdit = { newText = "int16", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "int32", sortText = "00045", textEdit = { newText = "int32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "int64", sortText = "00046", textEdit = { newText = "int64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "int8", sortText = "00047", textEdit = { newText = "int8", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v Type) int", filterText = "args", insertTextFormat = 1, kind = 3, label = "len", sortText = "00048", textEdit = { newText = "len", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(t Type, size ...int) Type", filterText = "args", insertTextFormat = 1, kind = 3, label = "make", sortText = "00049", textEdit = { newText = "make", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(Type) *Type", filterText = "args", insertTextFormat = 1, kind = 3, label = "new", sortText = "00050", textEdit = { newText = "new", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(v interface{})", filterText = "args", insertTextFormat = 1, kind = 3, label = "panic", sortText = "00051", textEdit = { newText = "panic", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(args ...Type)", filterText = "args", insertTextFormat = 1, kind = 3, label = "print", sortText = "00052", textEdit = { newText = "print", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(args ...Type)", filterText = "args", insertTextFormat = 1, kind = 3, label = "println", sortText = "00053", textEdit = { newText = "println", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(c complex128) float64", filterText = "args", insertTextFormat = 1, kind = 3, label = "real", sortText = "00054", textEdit = { newText = "real", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func() interface{}", filterText = "args", insertTextFormat = 1, kind = 3, label = "recover", sortText = "00055", textEdit = { newText = "recover", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "rune", sortText = "00056", textEdit = { newText = "rune", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "string", sortText = "00057", textEdit = { newText = "string", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 21, label = "true", sortText = "00058", textEdit = { newText = "true", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uint", sortText = "00059", textEdit = { newText = "uint", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uint16", sortText = "00060", textEdit = { newText = "uint16", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uint32", sortText = "00061", textEdit = { newText = "uint32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uint64", sortText = "00062", textEdit = { newText = "uint64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uint8", sortText = "00063", textEdit = { newText = "uint8", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 7, label = "uintptr", sortText = "00064", textEdit = { newText = "uintptr", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(args ...interface{})", documentation = "Error is equivalent to Log followed by Fail.", filterText = "args", insertTextFormat = 1, kind = 2, label = "t.Error", sortText = "00065", textEdit = { newText = "t.Error", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func(format string, args ...interface{})", documentation = "Errorf is equivalent to Logf followed by Fail.", filterText = "args", insertTextFormat = 1, kind = 2, label = "t.Errorf", sortText = "00066", textEdit = { newText = "t.Errorf", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { command = { command = "editor.action.triggerParameterHints", title = "" }, detail = "func()", documentation = "Fail marks the function as having failed but continues execution.", filterText = "args", insertTextFormat = 1, kind = 2, label = "t.Fail", sortText = "00067", textEdit = { newText = "t.Fail", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { filterText = "args", insertTextFormat = 1, kind = 6, label = "nil", sortText = "00068", textEdit = { newText = "nil", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/adler32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/adler32"', filterText = "args", insertTextFormat = 1, kind = 9, label = "adler32", sortText = "00069", textEdit = { newText = "adler32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/aes"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/aes"', filterText = "args", insertTextFormat = 1, kind = 9, label = "aes", sortText = "00070", textEdit = { newText = "aes", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/ascii85"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/ascii85"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ascii85", sortText = "00071", textEdit = { newText = "ascii85", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/asn1"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/asn1"', filterText = "args", insertTextFormat = 1, kind = 9, label = "asn1", sortText = "00072", textEdit = { newText = "asn1", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/ast"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/ast"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ast", sortText = "00073", textEdit = { newText = "ast", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'sync/atomic"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"sync/atomic"', filterText = "args", insertTextFormat = 1, kind = 9, label = "atomic", sortText = "00074", textEdit = { newText = "atomic", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/base32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/base32"', filterText = "args", insertTextFormat = 1, kind = 9, label = "base32", sortText = "00075", textEdit = { newText = "base32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/base64"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/base64"', filterText = "args", insertTextFormat = 1, kind = 9, label = "base64", sortText = "00076", textEdit = { newText = "base64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/big"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/big"', filterText = "args", insertTextFormat = 1, kind = 9, label = "big", sortText = "00077", textEdit = { newText = "big", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/binary"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/binary"', filterText = "args", insertTextFormat = 1, kind = 9, label = "binary", sortText = "00078", textEdit = { newText = "binary", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/bits"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/bits"', filterText = "args", insertTextFormat = 1, kind = 9, label = "bits", sortText = "00079", textEdit = { newText = "bits", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'bufio"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"bufio"', filterText = "args", insertTextFormat = 1, kind = 9, label = "bufio", sortText = "00080", textEdit = { newText = "bufio", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/build"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/build"', filterText = "args", insertTextFormat = 1, kind = 9, label = "build", sortText = "00081", textEdit = { newText = "build", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'bytes"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"bytes"', filterText = "args", insertTextFormat = 1, kind = 9, label = "bytes", sortText = "00082", textEdit = { newText = "bytes", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/bzip2"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/bzip2"', filterText = "args", insertTextFormat = 1, kind = 9, label = "bzip2", sortText = "00083", textEdit = { newText = "bzip2", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/cgi"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/cgi"', filterText = "args", insertTextFormat = 1, kind = 9, label = "cgi", sortText = "00084", textEdit = { newText = "cgi", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/cipher"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/cipher"', filterText = "args", insertTextFormat = 1, kind = 9, label = "cipher", sortText = "00085", textEdit = { newText = "cipher", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/cmplx"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/cmplx"', filterText = "args", insertTextFormat = 1, kind = 9, label = "cmplx", sortText = "00086", textEdit = { newText = "cmplx", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/color"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/color"', filterText = "args", insertTextFormat = 1, kind = 9, label = "color", sortText = "00087", textEdit = { newText = "color", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/constant"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/constant"', filterText = "args", insertTextFormat = 1, kind = 9, label = "constant", sortText = "00088", textEdit = { newText = "constant", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/cookiejar"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/cookiejar"', filterText = "args", insertTextFormat = 1, kind = 9, label = "cookiejar", sortText = "00089", textEdit = { newText = "cookiejar", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/crc32"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/crc32"', filterText = "args", insertTextFormat = 1, kind = 9, label = "crc32", sortText = "00090", textEdit = { newText = "crc32", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/crc64"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/crc64"', filterText = "args", insertTextFormat = 1, kind = 9, label = "crc64", sortText = "00091", textEdit = { newText = "crc64", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto"', filterText = "args", insertTextFormat = 1, kind = 9, label = "crypto", sortText = "00092", textEdit = { newText = "crypto", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/csv"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/csv"', filterText = "args", insertTextFormat = 1, kind = 9, label = "csv", sortText = "00093", textEdit = { newText = "csv", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/debug"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/debug"', filterText = "args", insertTextFormat = 1, kind = 9, label = "debug", sortText = "00094", textEdit = { newText = "debug", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/des"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/des"', filterText = "args", insertTextFormat = 1, kind = 9, label = "des", sortText = "00095", textEdit = { newText = "des", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/doc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/doc"', filterText = "args", insertTextFormat = 1, kind = 9, label = "doc", sortText = "00096", textEdit = { newText = "doc", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/draw"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/draw"', filterText = "args", insertTextFormat = 1, kind = 9, label = "draw", sortText = "00097", textEdit = { newText = "draw", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'database/sql/driver"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"database/sql/driver"', filterText = "args", insertTextFormat = 1, kind = 9, label = "driver", sortText = "00098", textEdit = { newText = "driver", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/dsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/dsa"', filterText = "args", insertTextFormat = 1, kind = 9, label = "dsa", sortText = "00099", textEdit = { newText = "dsa", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/dwarf"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/dwarf"', filterText = "args", insertTextFormat = 1, kind = 9, label = "dwarf", sortText = "00100", textEdit = { newText = "dwarf", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/ecdsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/ecdsa"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ecdsa", sortText = "00101", textEdit = { newText = "ecdsa", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/ed25519"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/ed25519"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ed25519", sortText = "00102", textEdit = { newText = "ed25519", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/elf"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/elf"', filterText = "args", insertTextFormat = 1, kind = 9, label = "elf", sortText = "00103", textEdit = { newText = "elf", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/elliptic"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/elliptic"', filterText = "args", insertTextFormat = 1, kind = 9, label = "elliptic", sortText = "00104", textEdit = { newText = "elliptic", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding"', filterText = "args", insertTextFormat = 1, kind = 9, label = "encoding", sortText = "00105", textEdit = { newText = "encoding", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'errors"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"errors"', filterText = "args", insertTextFormat = 1, kind = 9, label = "errors", sortText = "00106", textEdit = { newText = "errors", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/exec"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/exec"', filterText = "args", insertTextFormat = 1, kind = 9, label = "exec", sortText = "00107", textEdit = { newText = "exec", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'expvar"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"expvar"', filterText = "args", insertTextFormat = 1, kind = 9, label = "expvar", sortText = "00108", textEdit = { newText = "expvar", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/fcgi"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/fcgi"', filterText = "args", insertTextFormat = 1, kind = 9, label = "fcgi", sortText = "00109", textEdit = { newText = "fcgi", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'path/filepath"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"path/filepath"', filterText = "args", insertTextFormat = 1, kind = 9, label = "filepath", sortText = "00110", textEdit = { newText = "filepath", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/flate"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/flate"', filterText = "args", insertTextFormat = 1, kind = 9, label = "flate", sortText = "00111", textEdit = { newText = "flate", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'fmt"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"fmt"', filterText = "args", insertTextFormat = 1, kind = 9, label = "fmt", sortText = "00112", textEdit = { newText = "fmt", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash/fnv"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash/fnv"', filterText = "args", insertTextFormat = 1, kind = 9, label = "fnv", sortText = "00113", textEdit = { newText = "fnv", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/format"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/format"', filterText = "args", insertTextFormat = 1, kind = 9, label = "format", sortText = "00114", textEdit = { newText = "format", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/gif"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/gif"', filterText = "args", insertTextFormat = 1, kind = 9, label = "gif", sortText = "00115", textEdit = { newText = "gif", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/gob"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/gob"', filterText = "args", insertTextFormat = 1, kind = 9, label = "gob", sortText = "00116", textEdit = { newText = "gob", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/gosym"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/gosym"', filterText = "args", insertTextFormat = 1, kind = 9, label = "gosym", sortText = "00117", textEdit = { newText = "gosym", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/gzip"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/gzip"', filterText = "args", insertTextFormat = 1, kind = 9, label = "gzip", sortText = "00118", textEdit = { newText = "gzip", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'hash"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"hash"', filterText = "args", insertTextFormat = 1, kind = 9, label = "hash", sortText = "00119", textEdit = { newText = "hash", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/heap"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/heap"', filterText = "args", insertTextFormat = 1, kind = 9, label = "heap", sortText = "00120", textEdit = { newText = "heap", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/hex"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/hex"', filterText = "args", insertTextFormat = 1, kind = 9, label = "hex", sortText = "00121", textEdit = { newText = "hex", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/hmac"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/hmac"', filterText = "args", insertTextFormat = 1, kind = 9, label = "hmac", sortText = "00122", textEdit = { newText = "hmac", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'html"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"html"', filterText = "args", insertTextFormat = 1, kind = 9, label = "html", sortText = "00123", textEdit = { newText = "html", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http"', filterText = "args", insertTextFormat = 1, kind = 9, label = "http", sortText = "00124", textEdit = { newText = "http", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httptest"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httptest"', filterText = "args", insertTextFormat = 1, kind = 9, label = "httptest", sortText = "00125", textEdit = { newText = "httptest", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httptrace"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httptrace"', filterText = "args", insertTextFormat = 1, kind = 9, label = "httptrace", sortText = "00126", textEdit = { newText = "httptrace", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/httputil"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/httputil"', filterText = "args", insertTextFormat = 1, kind = 9, label = "httputil", sortText = "00127", textEdit = { newText = "httputil", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image"', filterText = "args", insertTextFormat = 1, kind = 9, label = "image", sortText = "00128", textEdit = { newText = "image", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/importer"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/importer"', filterText = "args", insertTextFormat = 1, kind = 9, label = "importer", sortText = "00129", textEdit = { newText = "importer", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'io"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"io"', filterText = "args", insertTextFormat = 1, kind = 9, label = "io", sortText = "00130", textEdit = { newText = "io", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"testing/iotest"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"testing/iotest"', filterText = "args", insertTextFormat = 1, kind = 9, label = "iotest", sortText = "00131", textEdit = { newText = "iotest", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'io/ioutil"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"io/ioutil"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ioutil", sortText = "00132", textEdit = { newText = "ioutil", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/jpeg"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/jpeg"', filterText = "args", insertTextFormat = 1, kind = 9, label = "jpeg", sortText = "00133", textEdit = { newText = "jpeg", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'syscall/js"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"syscall/js"', filterText = "args", insertTextFormat = 1, kind = 9, label = "js", sortText = "00134", textEdit = { newText = "js", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/json"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/json"', filterText = "args", insertTextFormat = 1, kind = 9, label = "json", sortText = "00135", textEdit = { newText = "json", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/rpc/jsonrpc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/rpc/jsonrpc"', filterText = "args", insertTextFormat = 1, kind = 9, label = "jsonrpc", sortText = "00136", textEdit = { newText = "jsonrpc", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/list"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/list"', filterText = "args", insertTextFormat = 1, kind = 9, label = "list", sortText = "00137", textEdit = { newText = "list", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'log"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"log"', filterText = "args", insertTextFormat = 1, kind = 9, label = "log", sortText = "00138", textEdit = { newText = "log", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/lzw"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/lzw"', filterText = "args", insertTextFormat = 1, kind = 9, label = "lzw", sortText = "00139", textEdit = { newText = "lzw", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/macho"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/macho"', filterText = "args", insertTextFormat = 1, kind = 9, label = "macho", sortText = "00140", textEdit = { newText = "macho", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/mail"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/mail"', filterText = "args", insertTextFormat = 1, kind = 9, label = "mail", sortText = "00141", textEdit = { newText = "mail", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'math"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math"', filterText = "args", insertTextFormat = 1, kind = 9, label = "math", sortText = "00142", textEdit = { newText = "math", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/md5"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/md5"', filterText = "args", insertTextFormat = 1, kind = 9, label = "md5", sortText = "00143", textEdit = { newText = "md5", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime"', filterText = "args", insertTextFormat = 1, kind = 9, label = "mime", sortText = "00144", textEdit = { newText = "mime", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime/multipart"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime/multipart"', filterText = "args", insertTextFormat = 1, kind = 9, label = "multipart", sortText = "00145", textEdit = { newText = "multipart", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net"', filterText = "args", insertTextFormat = 1, kind = 9, label = "net", sortText = "00146", textEdit = { newText = "net", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'os"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os"', filterText = "args", insertTextFormat = 1, kind = 9, label = "os", sortText = "00147", textEdit = { newText = "os", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/color/palette"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/color/palette"', filterText = "args", insertTextFormat = 1, kind = 9, label = "palette", sortText = "00148", textEdit = { newText = "palette", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/template/parse"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/template/parse"', filterText = "args", insertTextFormat = 1, kind = 9, label = "parse", sortText = "00149", textEdit = { newText = "parse", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/parser"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/parser"', filterText = "args", insertTextFormat = 1, kind = 9, label = "parser", sortText = "00150", textEdit = { newText = "parser", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'path"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"path"', filterText = "args", insertTextFormat = 1, kind = 9, label = "path", sortText = "00151", textEdit = { newText = "path", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/pe"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/pe"', filterText = "args", insertTextFormat = 1, kind = 9, label = "pe", sortText = "00152", textEdit = { newText = "pe", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/pem"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/pem"', filterText = "args", insertTextFormat = 1, kind = 9, label = "pem", sortText = "00153", textEdit = { newText = "pem", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/x509/pkix"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/x509/pkix"', filterText = "args", insertTextFormat = 1, kind = 9, label = "pkix", sortText = "00154", textEdit = { newText = "pkix", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'debug/plan9obj"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"debug/plan9obj"', filterText = "args", insertTextFormat = 1, kind = 9, label = "plan9obj", sortText = "00155", textEdit = { newText = "plan9obj", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'plugin"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"plugin"', filterText = "args", insertTextFormat = 1, kind = 9, label = "plugin", sortText = "00156", textEdit = { newText = "plugin", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'image/png"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"image/png"', filterText = "args", insertTextFormat = 1, kind = 9, label = "png", sortText = "00157", textEdit = { newText = "png", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/pprof"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/pprof"', filterText = "args", insertTextFormat = 1, kind = 9, label = "pprof", sortText = "00158", textEdit = { newText = "pprof", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/http/pprof"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/http/pprof"', filterText = "args", insertTextFormat = 1, kind = 9, label = "pprof", sortText = "00159", textEdit = { newText = "pprof", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/printer"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/printer"', filterText = "args", insertTextFormat = 1, kind = 9, label = "printer", sortText = "00160", textEdit = { newText = "printer", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"testing/quick"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"testing/quick"', filterText = "args", insertTextFormat = 1, kind = 9, label = "quick", sortText = "00161", textEdit = { newText = "quick", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mime/quotedprintable"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"mime/quotedprintable"', filterText = "args", insertTextFormat = 1, kind = 9, label = "quotedprintable", sortText = "00162", textEdit = { newText = "quotedprintable", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'math/rand"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"math/rand"', filterText = "args", insertTextFormat = 1, kind = 9, label = "rand", sortText = "00163", textEdit = { newText = "rand", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rand"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rand"', filterText = "args", insertTextFormat = 1, kind = 9, label = "rand", sortText = "00164", textEdit = { newText = "rand", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rc4"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rc4"', filterText = "args", insertTextFormat = 1, kind = 9, label = "rc4", sortText = "00165", textEdit = { newText = "rc4", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'regexp"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"regexp"', filterText = "args", insertTextFormat = 1, kind = 9, label = "regexp", sortText = "00166", textEdit = { newText = "regexp", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'ainer/ring"\n\t"cont', range = { end = { character = 6, line = 3 }, start = { character = 6, line = 3 } } } }, detail = '"container/ring"', filterText = "args", insertTextFormat = 1, kind = 9, label = "ring", sortText = "00167", textEdit = { newText = "ring", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/rpc"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/rpc"', filterText = "args", insertTextFormat = 1, kind = 9, label = "rpc", sortText = "00168", textEdit = { newText = "rpc", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/rsa"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/rsa"', filterText = "args", insertTextFormat = 1, kind = 9, label = "rsa", sortText = "00169", textEdit = { newText = "rsa", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime"', filterText = "args", insertTextFormat = 1, kind = 9, label = "runtime", sortText = "00170", textEdit = { newText = "runtime", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/scanner"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/scanner"', filterText = "args", insertTextFormat = 1, kind = 9, label = "scanner", sortText = "00171", textEdit = { newText = "scanner", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/scanner"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/scanner"', filterText = "args", insertTextFormat = 1, kind = 9, label = "scanner", sortText = "00172", textEdit = { newText = "scanner", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha1"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha1"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sha1", sortText = "00173", textEdit = { newText = "sha1", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha256"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha256"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sha256", sortText = "00174", textEdit = { newText = "sha256", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/sha512"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/sha512"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sha512", sortText = "00175", textEdit = { newText = "sha512", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/signal"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/signal"', filterText = "args", insertTextFormat = 1, kind = 9, label = "signal", sortText = "00176", textEdit = { newText = "signal", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/smtp"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/smtp"', filterText = "args", insertTextFormat = 1, kind = 9, label = "smtp", sortText = "00177", textEdit = { newText = "smtp", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'database/sql"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"database/sql"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sql", sortText = "00178", textEdit = { newText = "sql", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'strconv"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"strconv"', filterText = "args", insertTextFormat = 1, kind = 9, label = "strconv", sortText = "00179", textEdit = { newText = "strconv", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'strings"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"strings"', filterText = "args", insertTextFormat = 1, kind = 9, label = "strings", sortText = "00180", textEdit = { newText = "strings", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/subtle"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/subtle"', filterText = "args", insertTextFormat = 1, kind = 9, label = "subtle", sortText = "00181", textEdit = { newText = "subtle", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'index/suffixarray"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"index/suffixarray"', filterText = "args", insertTextFormat = 1, kind = 9, label = "suffixarray", sortText = "00182", textEdit = { newText = "suffixarray", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'sync"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"sync"', filterText = "args", insertTextFormat = 1, kind = 9, label = "sync", sortText = "00183", textEdit = { newText = "sync", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'regexp/syntax"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"regexp/syntax"', filterText = "args", insertTextFormat = 1, kind = 9, label = "syntax", sortText = "00184", textEdit = { newText = "syntax", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'syscall"\n\t"', range = { end = { character = 2, line = 6 }, start = { character = 2, line = 6 } } } }, detail = '"syscall"', filterText = "args", insertTextFormat = 1, kind = 9, label = "syscall", sortText = "00185", textEdit = { newText = "syscall", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'log/syslog"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"log/syslog"', filterText = "args", insertTextFormat = 1, kind = 9, label = "syslog", sortText = "00186", textEdit = { newText = "syslog", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/tabwriter"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/tabwriter"', filterText = "args", insertTextFormat = 1, kind = 9, label = "tabwriter", sortText = "00187", textEdit = { newText = "tabwriter", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'archive/tar"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"archive/tar"', filterText = "args", insertTextFormat = 1, kind = 9, label = "tar", sortText = "00188", textEdit = { newText = "tar", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'html/template"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"html/template"', filterText = "args", insertTextFormat = 1, kind = 9, label = "template", sortText = "00189", textEdit = { newText = "template", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"text/template"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"text/template"', filterText = "args", insertTextFormat = 1, kind = 9, label = "template", sortText = "00190", textEdit = { newText = "template", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/textproto"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/textproto"', filterText = "args", insertTextFormat = 1, kind = 9, label = "textproto", sortText = "00191", textEdit = { newText = "textproto", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"time"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"time"', filterText = "args", insertTextFormat = 1, kind = 9, label = "time", sortText = "00192", textEdit = { newText = "time", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/tls"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/tls"', filterText = "args", insertTextFormat = 1, kind = 9, label = "tls", sortText = "00193", textEdit = { newText = "tls", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/token"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/token"', filterText = "args", insertTextFormat = 1, kind = 9, label = "token", sortText = "00194", textEdit = { newText = "token", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'runtime/trace"\n\t"', range = { end = { character = 2, line = 5 }, start = { character = 2, line = 5 } } } }, detail = '"runtime/trace"', filterText = "args", insertTextFormat = 1, kind = 9, label = "trace", sortText = "00195", textEdit = { newText = "trace", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'go/types"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"go/types"', filterText = "args", insertTextFormat = 1, kind = 9, label = "types", sortText = "00196", textEdit = { newText = "types", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode"', filterText = "args", insertTextFormat = 1, kind = 9, label = "unicode", sortText = "00197", textEdit = { newText = "unicode", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unsafe"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unsafe"', filterText = "args", insertTextFormat = 1, kind = 9, label = "unsafe", sortText = "00198", textEdit = { newText = "unsafe", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'net/url"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"net/url"', filterText = "args", insertTextFormat = 1, kind = 9, label = "url", sortText = "00199", textEdit = { newText = "url", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'os/user"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"os/user"', filterText = "args", insertTextFormat = 1, kind = 9, label = "user", sortText = "00200", textEdit = { newText = "user", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode/utf16"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode/utf16"', filterText = "args", insertTextFormat = 1, kind = 9, label = "utf16", sortText = "00201", textEdit = { newText = "utf16", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = '\t"unicode/utf8"\n', range = { end = { character = 0, line = 7 }, start = { character = 0, line = 7 } } } }, detail = '"unicode/utf8"', filterText = "args", insertTextFormat = 1, kind = 9, label = "utf8", sortText = "00202", textEdit = { newText = "utf8", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'crypto/x509"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"crypto/x509"', filterText = "args", insertTextFormat = 1, kind = 9, label = "x509", sortText = "00203", textEdit = { newText = "x509", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'encoding/xml"\n\t"', range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } } } }, detail = '"encoding/xml"', filterText = "args", insertTextFormat = 1, kind = 9, label = "xml", sortText = "00204", textEdit = { newText = "xml", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'archive/zip"\n\t"', range = { end = { character = 2, line = 3 }, start = { character = 2, line = 3 } } } }, detail = '"archive/zip"', filterText = "args", insertTextFormat = 1, kind = 9, label = "zip", sortText = "00205", textEdit = { newText = "zip", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } }, { additionalTextEdits = { { newText = 'mpress/zlib"\n\t"co', range = { end = { character = 4, line = 3 }, start = { character = 4, line = 3 } } } }, detail = '"compress/zlib"', filterText = "args", insertTextFormat = 1, kind = 9, label = "zlib", sortText = "00206", textEdit = { newText = "zlib", range = { end = { character = 9, line = 40 }, start = { character = 9, line = 40 } } } } } }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment