code

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PackageMain contains package main declaration string
	PackageMain = "package main\n"
)

Variables

This section is empty.

Functions

func ReadAndPreparePartialSource

func ReadAndPreparePartialSource(r io.Reader) (string, error)

ReadAndPreparePartialSource reads sources from a givven reader and prepends a package declaration if needed

func ToPackageVisibleIdentifier

func ToPackageVisibleIdentifier(name string) string

ToPackageVisibleIdentifier makes go identifier package-visible only

Types

type Generator

type Generator interface {
	Generate(io.Writer) error
}

Generator defines interface that generates sources

func WrapWithBannerPrinter

func WrapWithBannerPrinter(g Generator) Generator

WrapWithBannerPrinter wraps given generator with printer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL