Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant seem to Unmarshal char[] #30

Open
EugeneKallis opened this issue Apr 13, 2022 · 0 comments
Open

Cant seem to Unmarshal char[] #30

EugeneKallis opened this issue Apr 13, 2022 · 0 comments

Comments

@EugeneKallis
Copy link

Im trying to use UnmarshalDict any i got it to work with all fields but a list of char

My table structure

c          | t f a
-----------| -----
id         | s    
dispname   | C    
order      | i    
update_time| z    

My Struct for this table

type Linkgroup struct {
	Id          string    `json:"id"`
	Dispname    string    `json:"dispname"`
	Order       int32     `json:"order"`
	Update_time time.Time `json:"update_time"`
}

i do a db.Call("0!select from linkgroups")
Then i do the following

tbl := t.Data.(kdb.Table)
dict := tbl.Index(2)
var data2 models.Linkgroup
err := kdb.UnmarshalDict(dict, data2)
fmt.Println(data2)

All the fields work except Dispname.

Thank you for any help, hopefully you still look at this repo

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

No branches or pull requests

1 participant