This is an attempt to extend the golang builtin package with more utilities while improving the consistence of its interface.
| Package | Description | Status |
|---|---|---|
| fsx | File System | stable |
| jsonx | Json | stable |
| mathx | Math for ints and floats | stable |
| randx | Random | stable |
| runex | Runes | stable |
| strx | Strings | stable |
| dsx | Data Structures | experimental |
| httpx | Networking | experimental |
| logx | Logs, prints and formatting | experimental |
| iterx | Iterators | wip |
| syncx | Sync/Async | _wip |
go get github.com/renatopp/ximport (
"github.com/renatopp/x/httpx"
"github.com/renatopp/x/logx"
)
func main() {
response := httpx.Fetch("GET", "https://google.com")
if !response.Is2xx() {
logx.Println("Bad request!")
return
}
logx.Println("Body: %v", response.Text())
}