generate

package
v0.0.0-...-9d9fdcb Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Goexports generates wrappers of package exported symbols

Output files are written in the current directory, and prefixed with the go version.

Usage:

goexports package...

Example:

goexports github.com/containous/yaegi/interp

The same goexport program is used for all target operating systems and architectures. The GOOS and GOARCH environment variables set the desired target.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenContent

func GenContent(dest, pkgName string) ([]byte, error)

GenContent returns a byte slice of the generated content for the file, or an error. dest should be the destination package name, and `pkgName` should be the package name to parse under a full gopath.

Types

type Method

type Method struct {
	Name, Param, Result, Arg, Ret string
}

Method store information for generating interface wrapper method

type Val

type Val struct {
	Name string // "package.name"
	Addr bool   // true if symbol is a Var
}

Val store the value name and addressable status of symbols

type Wrap

type Wrap struct {
	Name   string
	Method []Method
}

Wrap store information for generating interface wrapper

Jump to

Keyboard shortcuts

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