Closed mritd closed 1 month ago
Hi, at this moment no, snake has no special tag, because it is pretty rare.
For your case it will be better to implement custom LoadFromCell
method for comment
type, and it will be called automatically instead of parsing tags.
Example https://github.com/xssnick/tonutils-go/blob/master/tlb/account.go#L128-L163
Then you can have just something like
type Comment struct {
Text string
}
with custom LoadFromCell
method (and ToCell
if you want serialization also)
I've looked at the docs in the loader.go, but still haven't figured out how to load the string snake; for now I'm stuck with the
*cell.Cell
:I'm wondering if there are other ways to directly deserialize structs, such as
tlb: "snake"
?