mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 07:02:29 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4848647918 | ||
|
|
45fc84d1f2 |
@@ -5,7 +5,6 @@
|
|||||||
</p>
|
</p>
|
||||||
<div align="center" style="text-align: center;">
|
<div align="center" style="text-align: center;">
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
English | [简体中文](./README_zh-CN.md)
|
English | [简体中文](./README_zh-CN.md)
|
||||||
@@ -53,7 +52,7 @@ func main() {
|
|||||||
|
|
||||||
### API Documentation
|
### API Documentation
|
||||||
|
|
||||||
#### 1. convertor contains some functions for data convertion.
|
#### 1. convertor contains some functions for data convertion
|
||||||
|
|
||||||
- Support conversion between commonly used data types.
|
- Support conversion between commonly used data types.
|
||||||
- Usage: import "github.com/duke-git/lancet/cryptor"
|
- Usage: import "github.com/duke-git/lancet/cryptor"
|
||||||
@@ -91,7 +90,7 @@ func ToString(value interface{}) string //convert value to string
|
|||||||
func StructToMap(value interface{}) (map[string]interface{}, error) //convert struct to map, only convert exported field, tag `json` should be set
|
func StructToMap(value interface{}) (map[string]interface{}, error) //convert struct to map, only convert exported field, tag `json` should be set
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. cryptor is for data encryption and decryption.
|
#### 2. cryptor is for data encryption and decryption
|
||||||
|
|
||||||
- Support md5, hmac, aes, des, ras.
|
- Support md5, hmac, aes, des, ras.
|
||||||
- Usage: import "github.com/duke-git/lancet/cryptor"
|
- Usage: import "github.com/duke-git/lancet/cryptor"
|
||||||
@@ -284,7 +283,7 @@ func HttpPatch(url string, params ...interface{}) (*http.Response, error) //http
|
|||||||
func ConvertMapToQueryString(param map[string]interface{}) string //convert map to url query string
|
func ConvertMapToQueryString(param map[string]interface{}) string //convert map to url query string
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 7. random is for rand string and int generation.
|
#### 7. random is for rand string and int generation
|
||||||
|
|
||||||
- Generate random string and int.
|
- Generate random string and int.
|
||||||
- Usage: import "github.com/duke-git/lancet/random".
|
- Usage: import "github.com/duke-git/lancet/random".
|
||||||
|
|||||||
Reference in New Issue
Block a user