specific

package
v0.0.0-...-d7d4131 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 13 Imported by: 3

Documentation

Overview

Package specific copies the source from a package and generates a second package replacing some of the types used. It's aimed at taking generic packages that rely on interface{} and generating packages that use a specific type.

Package specific copies the source from a package and generates a second package replacing some of the types used. It's aimed at taking generic packages that rely on interface{} and generating packages that use a specific type.

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	SkipTestFiles: false,
}

Functions

func Process

func Process(pkg, outdir string, newType string, optset ...func(*Options)) error

Process creates a specific package from the generic specified in pkg

Types

type FileError

type FileError struct {
	Package string
	File    string
	Err     error
}

func (FileError) Error

func (ferr FileError) Error() string

type Options

type Options struct {
	SkipTestFiles bool
}

type Package

type Package struct {
	Dir         string
	GoFiles     []string
	TestGoFiles []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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