From 993ee50b3dfd42bd3f65686246b42b0ab982ff57 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 25 Dec 2018 09:27:00 -0800 Subject: [PATCH] style: Run goimports on everything Similar to writeas/writeas-cli#22, this change runs goimports on all files and changes the recommendation in the Contributing section to do the same. --- README.md | 2 +- auth_test.go | 4 +--- post_test.go | 3 +-- user.go | 4 +--- writeas.go | 5 +++-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 17cc920..5288001 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ func main() { The library covers our usage, but might not be comprehensive of the API. So we always welcome contributions and improvements from the community. Before sending pull requests, make sure you've done the following: -* Run `go fmt` on all updated .go files. +* Run `goimports` on all updated .go files. * Document all exported structs and funcs. ## License diff --git a/auth_test.go b/auth_test.go index 3c78c7e..a9ece6f 100644 --- a/auth_test.go +++ b/auth_test.go @@ -1,8 +1,6 @@ package writeas -import ( - "testing" -) +import "testing" func TestAuthentication(t *testing.T) { dwac := NewDevClient() diff --git a/post_test.go b/post_test.go index f995f2b..a7e3475 100644 --- a/post_test.go +++ b/post_test.go @@ -1,10 +1,9 @@ package writeas import ( - "testing" - "fmt" "strings" + "testing" ) func TestCreatePost(t *testing.T) { diff --git a/user.go b/user.go index e10f3c8..5973d9c 100644 --- a/user.go +++ b/user.go @@ -1,8 +1,6 @@ package writeas -import ( - "time" -) +import "time" type ( // AuthUser represents a just-authenticated user. It contains information diff --git a/writeas.go b/writeas.go index f31cfbc..1a646e7 100644 --- a/writeas.go +++ b/writeas.go @@ -3,13 +3,14 @@ package writeas import ( "bytes" - "code.as/core/socks" "encoding/json" "fmt" - "github.com/writeas/impart" "io" "net/http" "time" + + "code.as/core/socks" + "github.com/writeas/impart" ) const (