Browse Source

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.
Abhinav Gupta 10 months ago
parent
commit
993ee50b3d
5 changed files with 7 additions and 11 deletions
  1. 1
    1
      README.md
  2. 1
    3
      auth_test.go
  3. 1
    2
      post_test.go
  4. 1
    3
      user.go
  5. 3
    2
      writeas.go

+ 1
- 1
README.md View File

@@ -63,7 +63,7 @@ func main() {
63 63
 
64 64
 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:
65 65
 
66
-* Run `go fmt` on all updated .go files.
66
+* Run `goimports` on all updated .go files.
67 67
 * Document all exported structs and funcs.
68 68
 
69 69
 ## License

+ 1
- 3
auth_test.go View File

@@ -1,8 +1,6 @@
1 1
 package writeas
2 2
 
3
-import (
4
-	"testing"
5
-)
3
+import "testing"
6 4
 
7 5
 func TestAuthentication(t *testing.T) {
8 6
 	dwac := NewDevClient()

+ 1
- 2
post_test.go View File

@@ -1,10 +1,9 @@
1 1
 package writeas
2 2
 
3 3
 import (
4
-	"testing"
5
-
6 4
 	"fmt"
7 5
 	"strings"
6
+	"testing"
8 7
 )
9 8
 
10 9
 func TestCreatePost(t *testing.T) {

+ 1
- 3
user.go View File

@@ -1,8 +1,6 @@
1 1
 package writeas
2 2
 
3
-import (
4
-	"time"
5
-)
3
+import "time"
6 4
 
7 5
 type (
8 6
 	// AuthUser represents a just-authenticated user. It contains information

+ 3
- 2
writeas.go View File

@@ -3,13 +3,14 @@ package writeas
3 3
 
4 4
 import (
5 5
 	"bytes"
6
-	"code.as/core/socks"
7 6
 	"encoding/json"
8 7
 	"fmt"
9
-	"github.com/writeas/impart"
10 8
 	"io"
11 9
 	"net/http"
12 10
 	"time"
11
+
12
+	"code.as/core/socks"
13
+	"github.com/writeas/impart"
13 14
 )
14 15
 
15 16
 const (