Skip to content

SiaFoundation/encodegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

encodegen

encodegen generates marshaling and unmarshaling implementations for the Sia encoding format.

Installation

go install go.sia.tech/encodegen

Usage

Add a //go:generate directive to the package containing the types you want to generate methods for:

//go:generate encodegen -t Foo,Bar

type Foo struct {
    ...
}

type Bar struct {
    ...
}

When run, this will add an encoding.go file to the package, containing MarshalSia and UnmarshalSia method definitions for each of the specified types.

About

Automatically generate marshal/unmarshalers for NebulousLabs/encoding

Resources

License

Stars

Watchers

Forks

Packages

No packages published