Skip to content

Conversation

@Hamster601
Copy link

add gvar example

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #1486 (85aa850) into master (9105590) will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1486      +/-   ##
==========================================
+ Coverage   71.02%   71.10%   +0.07%     
==========================================
  Files         414      414              
  Lines       40022    40022              
==========================================
+ Hits        28425    28456      +31     
+ Misses       9805     9773      -32     
- Partials     1792     1793       +1     
Flag Coverage Δ
go-1.14 71.07% <ø> (+0.12%) ⬆️
go-1.15 71.04% <ø> (+0.07%) ⬆️
go-1.16 71.01% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
os/glog/glog_logger_rotate.go 68.78% <0.00%> (-1.47%) ⬇️
container/gvar/gvar.go 92.13% <0.00%> (+2.24%) ⬆️
container/gvar/gvar_struct.go 100.00% <0.00%> (+50.00%) ⬆️
container/gvar/gvar_map.go 89.47% <0.00%> (+78.94%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9105590...85aa850. Read the comment docs.

}

func ExampleVar_Struct() {
params1 := map[string]interface{}{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var m = g.Map{"id": 1, "price": 100.00}
var a1 = gvar.New(m)
var b1 = a1.Map()
fmt.Println(b1["id"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gqcn gqcn merged commit b649c5a into gogf:master Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants