go generate is only useful if you have tools to use it with! Here is an incomplete list of useful tools that generate code.
- goyacc – Yacc for Go.
- stringer – Implements
fmt.Stringerinterface for enums. - gostringer – Implements
fmt.GoStringerinterface for enums. - jsonenums – Implements
json.Marshalerandjson.Unmarshalerinterfaces for enums. - go-syncmap - Generates Go code using a package as a generic template for
sync.Map. - go-syncpool - Generates Go code using a package as a generic template for
sync.Pool. - go-atomicvalue - Generates Go code using a package as a generic template for
atomic.Value. - go-nulljson - Generates Go code using a package as a generic template that implements
database/sql.Scanneranddatabase/sql/driver.Valuer. - go-enum - Generates Go code using a package as a generic template which implements interface
fmt.Stringer|binary|json|text|sql|yamlfor enums. - enumer - Generates Go code that convert Go enum to/from strings.
- go-import — Performs auto import of non go files.
- gojson - Generates go struct definitions from example json documents.
- vfsgen - Generates a vfsdata.go file that statically implements the given virtual filesystem.
- goreuse - Generates Go code using a package as a generic template by replacing definitions.
- embedfiles - Embeds files into Go code.
- ragel - State machine compiler
- peachpy - x86-64 assembler embedded in Python, generates Go assembly
- bundle - Bundle creates a single-source-file version of a source package suitable for inclusion in a particular target package.
- msgp - A Go code generator for MessagePack
- protobuf - protobuf
- thriftrw - thrift
- gogen-avro - avro
- swagger-gen-types - go types from swagger specifications
- avo - generate assembly code with Go
- Wire - Compile-time Dependency Injection for Go
- sumgen - generate interface method implementations from sum-type declarations
- interface-extractor - generates an interface of a desired type, with only methods used within the package.
- deep-copy - creates a deep copy method for the given types.
- libfsm - fsm toolkit supporting (among others) Go and Go-flavored amd64 assembly for matching regexps
- re2c - lexer generator for C, C++ and Go
- re2dfa - Transform regular expressions into finite state machines and output Go source code
- pigeon - a PEG parser generator for Go
AVX512 Articles AssemblyPolicy Benchmarks Blogs Books BoundingResourceUse CSSStyleGuide ChromeOS CodeReview CodeReviewComments CodeReviewConcurrency CodeTools Comments CommitMessage CommonMistakes CompilerOptimizations Conferences Configuring GoLand for WebAssembly Contributing to gopls CoreDumpDebugging Courses CreatingSubRepository CustomPprofProfiles Darwin DashboardBuilders Deprecated DesignDocuments Diagnostics Download build farm failed logs and debugging DragonFly BSD ErrorValueFAQ Errors ExperienceReports FileTreeDocumentation FreeBSD FromXToGo Frozen Fuzzing trophy case GOPATH Gardening GcToolchainTricks GccgoCrossCompilation GerritAccess GerritBot GithubAccess Go 1.10 Release Party Go 1.6 release party Go 1.8 Release Party Go Community Slides Go Release Cycle Go2 Go2ErrorHandlingFeedback Go2ErrorValuesFeedback Go2GenericsFeedback GoArm GoForCPPProgrammers GoGenerateTools GoGetProxyConfig GoGetTools GoMips GoStrings GoTalks GoUserGroups GoUsers Gomote Gopher HandlingIssues Home HostedContinuousIntegration How to ask for help HowToAsk IDEsAndTextEditorPlugins InstallFromSource InstallTroubleshooting InterfaceSlice InvalidFlag Iota Learn LearnConcurrency LearnErrorHandling LearnServerProgramming LearnTesting Linux LinuxKernelSignalVectorBug Livestreams LockOSThread MacOS12BSDThreadRegisterIssue MethodSets MinimumRequirements MinorReleases Mobile Modules MutexOrChannel NativeClient NetBSD NewSpeakers NoMeToo NoPlusOne NonEnglish OpenBSD PackagePublishing PanicAndRecover PerfDashboard Performance Plan9 Podcasts PortingPolicy PriorDiscussion Projects Proposals ProviderIntegration Questions Quiet Weeks Range RateLimiting ResearchPapers Resolving Problems From Modified Module Path Resources for slog SQLDrivers SQLInterface Screencasts SettingGOPATH SignalHandling SimultaneousAssignment SliceTricks SlowBots Solaris Spectre Spelling Style SuccessStories Switch TableDrivenTests TargetSpecific TestComments TestFailures Timeouts Training Ubuntu Watchflakes WebAccessibilityResourcesAndTips Well known struct tags WhyGo Windows WindowsBuild WindowsCrossCompiling WindowsDLLs X Repositories _Footer cgo golang tools gopherbot gopls integrator FAQ gopls heapdump13 heapdump14 heapdump15 through heapdump17 heapdump15