Skip to content

jhump/gopoet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d698baa · Jul 14, 2020

History

32 Commits
Sep 26, 2018
May 28, 2020
May 30, 2018
May 28, 2020
Jul 14, 2020
Jul 15, 2019
Jun 8, 2018
May 28, 2020
May 28, 2020
Sep 26, 2018
Jul 15, 2019
Sep 26, 2018
Sep 26, 2018
Sep 26, 2018
Sep 26, 2018
Jul 15, 2019
Jul 15, 2019
Jul 15, 2019
Mar 22, 2019
Sep 26, 2018

Repository files navigation

Go Poet

Build Status Go Report Card GoDoc

This library was inspired by Java Poet, as a library that provides a simple language model for generating Go code.

The model it provides is much simpler than the model exposed by go/ast and go/types, both in its expressive power and in its usability. It cannot model implementation code, which is handled in the library with special support for formatting (a la fmt.Printf) references to symbols and types. This support allows it to provide automatic management of import statements: so you just build the model of the program to generate, and it will emit the program with all of the necessary imports and properly qualified references in the code.