Universal set of tools to make development in Go as simple as making a cup of tea.
The most simple way to install tea is by Go native installation functionality. Example:
$ go install go.strv.io/tea/cmd/tea@${version:-latest}
Version points to a stable release.
For detailed description of each command or global options, run the command with -h
argument.
Prints tea version and ends.
$ tea version
$ 1.0.0
This command provides a set of tools for code generating.
Subcommand id
generates useful methods for serialization/deserialization of IDs within Go apps. Example:
$ tea gen id -i ./id.go -o ./id_gen.go
This subcommand can also be used as an embedded go generator. Example:
id.go:
package id
import (
"github.com/google/uuid"
)
//go:generate tea gen id -i ./id.go -o ./id_gen.go
type (
User uint64
RefreshToken uuid.UUID
DeviceIdentifier string
)
After triggering go generate ./...
within an app, methods MarshalText
and UnmarshalText
along with other useful functions are generated.