[goptlib/master] Simplify with gofmt -s.

commit c0d0d322b6e960cd7da6ee43d24f747488c2ad00 Author: David Fifield <david@bamsoftware.com> Date: Sun Aug 31 19:16:39 2014 -0700 Simplify with gofmt -s. gofmt -l -w -s . --- args.go | 2 +- args_test.go | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/args.go b/args.go index c38adf7..f1b5a8d 100644 --- a/args.go +++ b/args.go @@ -200,7 +200,7 @@ func encodeSmethodArgs(args Args) string { } keys := make([]string, 0, len(args)) - for key, _ := range args { + for key := range args { keys = append(keys, key) } sort.Strings(keys) diff --git a/args_test.go b/args_test.go index 8a77251..134ac31 100644 --- a/args_test.go +++ b/args_test.go @@ -255,29 +255,29 @@ func TestParseServerTransportOptions(t *testing.T) { { "t:k=v", map[string]Args{ - "t": Args{"k": []string{"v"}}, + "t": {"k": []string{"v"}}, }, }, { "t1:k=v1;t2:k=v2;t1:k=v3", map[string]Args{ - "t1": Args{"k": []string{"v1", "v3"}}, - "t2": Args{"k": []string{"v2"}}, + "t1": {"k": []string{"v1", "v3"}}, + "t2": {"k": []string{"v2"}}, }, }, { "t\\:1:k=v;t\\=2:k=v;t\\;3:k=v;t\\\\4:k=v", map[string]Args{ - "t:1": Args{"k": []string{"v"}}, - "t=2": Args{"k": []string{"v"}}, - "t;3": Args{"k": []string{"v"}}, - "t\\4": Args{"k": []string{"v"}}, + "t:1": {"k": []string{"v"}}, + "t=2": {"k": []string{"v"}}, + "t;3": {"k": []string{"v"}}, + "t\\4": {"k": []string{"v"}}, }, }, { "t:k\\:1=v;t:k\\=2=v;t:k\\;3=v;t:k\\\\4=v", map[string]Args{ - "t": Args{ + "t": { "k:1": []string{"v"}, "k=2": []string{"v"}, "k;3": []string{"v"}, @@ -288,14 +288,14 @@ func TestParseServerTransportOptions(t *testing.T) { { "t:k=v\\:1;t:k=v\\=2;t:k=v\\;3;t:k=v\\\\4", map[string]Args{ - "t": Args{"k": []string{"v:1", "v=2", "v;3", "v\\4"}}, + "t": {"k": []string{"v:1", "v=2", "v;3", "v\\4"}}, }, }, { "trebuchet:secret=nou;trebuchet:cache=/tmp/cache;ballista:secret=yes", map[string]Args{ - "trebuchet": Args{"secret": []string{"nou"}, "cache": []string{"/tmp/cache"}}, - "ballista": Args{"secret": []string{"yes"}}, + "trebuchet": {"secret": []string{"nou"}, "cache": []string{"/tmp/cache"}}, + "ballista": {"secret": []string{"yes"}}, }, }, }
participants (1)
-
dcf@torproject.org