Skip to content

Commit

Permalink
xutil Add x prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
onanying committed Apr 28, 2023
1 parent ebf7078 commit e0e7ff4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ go get github.com/mix-go/xutil
Execute an http request.

```go
http.Request(method string, u string, body string, opts ...Options) ([]byte, error)
xhttp.Request(method string, u string, body string, opts ...Options) ([]byte, error)
```

```go
http.RequestString(method string, u string, body string, opts ...Options) (string, error)
xhttp.RequestString(method string, u string, body string, opts ...Options) (string, error)
```

搜索数组中是否存在指定的值。

Searches if the specified value exists in the array.

```go
slices.InArray[T comparable](item T, slice []T) bool
xslices.InArray[T comparable](item T, slice []T) bool
```

用于检测变量是否为数字或数字字符串。

Used to check if the variable is a number or a numeric string.

```go
strings.IsNumeric(s string) bool
xstrings.IsNumeric(s string) bool
```

## License
Expand Down
2 changes: 1 addition & 1 deletion http/request.go → xhttp/request.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package http
package xhttp

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion slices/slices.go → xslices/slices.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package slices
package xslices

func InArray[T comparable](item T, slice []T) bool {
for _, v := range slice {
Expand Down
2 changes: 1 addition & 1 deletion strings/strings.go → xstrings/strings.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strings
package xstrings

import "strconv"

Expand Down

0 comments on commit e0e7ff4

Please sign in to comment.