Allow go2idl to generate non-Go file types

Remove some indentation from file generation for specific languages,
allow SnippetWriter's io.Writer to be accessed, and add Path to
types.Name for languages where Package and Path can be disjoint.
This commit is contained in:
Clayton Coleman
2015-11-26 18:16:26 -05:00
parent 799ab4485b
commit 72df8bbfbe
12 changed files with 146 additions and 76 deletions

View File

@@ -83,6 +83,11 @@ func New() *Builder {
}
}
// AddBuildTags adds the specified build tags to the parse context.
func (b *Builder) AddBuildTags(tags ...string) {
b.context.BuildTags = append(b.context.BuildTags, tags...)
}
// Get package information from the go/build package. Automatically excludes
// e.g. test files and files for other platforms-- there is quite a bit of
// logic of that nature in the build package.