Skip to content

Commit ad5449d

Browse files
CopilotdrQedwards
andcommitted
fix: address review comments - fix import grouping and README replace directive
- README.md: Replace incorrect `import "xurl"` guidance with proper `replace github.com/xdevplatform/xurl => ../xurl` directive - api/client.go: Reorder imports into stdlib / third-party groups - api/media.go: Reorder imports into stdlib / third-party groups Co-authored-by: drQedwards <213266729+drQedwards@users.noreply.github.com>
1 parent a7071f6 commit ad5449d

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ Import by module path in other Go projects:
4444
import "github.com/xdevplatform/xurl"
4545
```
4646

47-
If your consuming project uses a local replace for this repo and requires the short path, `import "xurl"` also works with:
47+
If your consuming project uses a local checkout of this repo, you can use a `replace` directive in your `go.mod` while still importing by the full module path:
4848

4949
```go
50-
require xurl v0.0.0
50+
require github.com/xdevplatform/xurl v0.0.0
5151

52-
replace xurl => ../xurl
52+
replace github.com/xdevplatform/xurl => ../xurl
5353
```
5454

5555

api/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
package api
22

33
import (
4+
"bufio"
45
"bytes"
56
"encoding/json"
67
"errors"
78
"fmt"
89
"io"
10+
"mime/multipart"
911
"net/http"
12+
"os"
13+
"path/filepath"
1014
"strings"
1115
"time"
1216

13-
"bufio"
1417
"github.com/xdevplatform/xurl/auth"
1518
"github.com/xdevplatform/xurl/config"
1619
xurlErrors "github.com/xdevplatform/xurl/errors"
1720
"github.com/xdevplatform/xurl/version"
18-
"mime/multipart"
19-
"os"
20-
"path/filepath"
2121
)
2222

2323
// RequestOptions contains common options for API requests

api/media.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package api
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/xdevplatform/xurl/utils"
76
"io"
87
"os"
98
"path/filepath"
109
"strconv"
1110
"strings"
1211
"time"
12+
13+
"github.com/xdevplatform/xurl/utils"
1314
)
1415

1516
const (

0 commit comments

Comments
 (0)