ubgo is in early alpha: libraries and APIs may still change.

Skip to content
ubgo Alpha

gots cli

Generates TypeScript types, enums, constants and interfaces from Go source.

go install github.com/ubgo/gots/cmd/cli@latest
Language
Go
Go version
1.24.2
Core deps
2 direct
Latest tag
v0.1.0
License
Apache-2.0
Go modules
1

Code from the README

type MessageRole string

const (
    MessageRoleUser      MessageRole = "user"
    MessageRoleAssistant MessageRole = "assistant"
    MessageRoleSystem    MessageRole = "system"
)

From the gots README.

At a glance (from the README)

KeyTypeRequiredDescription
filestringyesPath to Go source file (absolute or relative)
outputstringyesPath for generated .ts file
stylestringnoOverride default_style for this file
includestring[]noWhitelist of type names (supports * wildcard)
excludestring[]noBlacklist of type names (supports * wildcard)
struct_styleinterface | typeinterfaceStruct output format
embed_strategyflatten | extends | intersectionextendsEmbedded struct rendering