mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-08 22:52:29 +08:00
merge main
This commit is contained in:
@@ -134,13 +134,16 @@ func ExampleStructToUrlValues() {
|
||||
Name: "test",
|
||||
Status: "completed",
|
||||
}
|
||||
queryValues1 := StructToUrlValues(item1)
|
||||
queryValues1, err := StructToUrlValues(item1)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
item2 := TodoQuery{
|
||||
Id: 2,
|
||||
UserId: 456,
|
||||
}
|
||||
queryValues2 := StructToUrlValues(item2)
|
||||
queryValues2, _ := StructToUrlValues(item2)
|
||||
|
||||
fmt.Println(queryValues1.Get("id"))
|
||||
fmt.Println(queryValues1.Get("userId"))
|
||||
|
||||
Reference in New Issue
Block a user