code

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompatibleTypes

func CompatibleTypes(expected types.Type, actual types.Type) error

CompatibleTypes isnt a strict comparison, it allows for pointer differences

func ImportPathForDir

func ImportPathForDir(dir string) string

ImportPathFromDir takes an *absolute* path and returns a golang import path for the package, and returns an error if it isn't on the gopath

func NameForPackage

func NameForPackage(importPath string) string

func NormalizeVendor

func NormalizeVendor(pkg string) string

NormalizeVendor takes a qualified package path and turns it into normal one. eg . github.com/foo/vendor/github.com/99designs/gqlgen/graphql becomes github.com/99designs/gqlgen/graphql

func PkgAndType

func PkgAndType(name string) (string, string)

take a string in the form github.com/package/blah.Type and split it into package and type

func QualifyPackagePath

func QualifyPackagePath(importPath string) string

QualifyPackagePath takes an import and fully qualifies it with a vendor dir, if one is required. eg . github.com/99designs/gqlgen/graphql becomes github.com/foo/vendor/github.com/99designs/gqlgen/graphql

x/tools/packages only supports 'qualified package paths' so this will need to be done prior to calling it See https://github.com/golang/go/issues/30289

func SanitizePackageName

func SanitizePackageName(pkg string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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