gogen

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 6 Imported by: 3 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gogen contains various useful functions for creating Go source code files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImportPath

func GetImportPath() string

GetImportPath returns the importPath name - it does this by running the go list command and gathering the output

func GetPackage

func GetPackage() string

GetPackage returns the package name - it does this by running the go list command and gathering the output

func MakeFileOrDie

func MakeFileOrDie(filename string) *os.File

MakeFileOrDie creates the file truncating it if it already exists and returning the open file. If an error is detected, it is reported and the program exits

func PrintPreamble

func PrintPreamble(f *os.File, ps *param.PSet)

PrintPreamble prints the package name and the introductory comments for the file to be generated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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