nomsify

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NomsifyRe = `(?m:^//nomsify (.*)$)`
	PackageRe = `(?m:^package (\w+)$)`
)

We use these regular expressions to inspect go source files and determine what to nomsify

Variables

This section is empty.

Functions

func GeneratedNameFor

func GeneratedNameFor(path string) string

GeneratedNameFor returns the path for a generated file based on the input path.

It assumes that the input path is a filename ending in ".go"

func Implement

func Implement(path, typeName string, out io.Writer) error

Implement MarshalNoms and UnmarshalNoms for the given type implemented at the given path.

Writes the generated code to the supplied writer.

func Scan

func Scan(path string, verbose *bool) error

Scan the go package at the given path and nomsify all specified types within.

Types

This section is empty.

Jump to

Keyboard shortcuts

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