Skip to content

xapi-tools/gocodegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocodegen - Go Code Generator

This package provides Go structures for constructs used in Go source code and a helper to write those constructs to .go file with valid syntax.

Usage

  1. Get the package

    go get github.com/xapi-tools/gocodegen@latest
  2. Create Go structures for intended source code and generate file

    package main
    
    import gcg "github.com/xapi-tools/gocodegen"
    
    func main() {
        gw := gcg.NewGoFileWriter()
    
        gw.ToFile("./test.go")
    }

    Check following for more comprehensive examples:

Releases

No releases published

Packages

No packages published

Languages