util

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErrorsWithExit added in v0.13.1

func CheckErrorsWithExit(errs []error)

CheckErrorsWithExit is used in several places to bail out after a compilation that contains failures.

func Interface added in v0.18.0

func Interface(in map[string]*types.Type) string

func IsPublic

func IsPublic(funcName string) bool

IsPublic returns true if a function name is visible outside of a package.

func MatchesGlob added in v0.17.11

func MatchesGlob(s, glob string) bool

MatchesGlob is a very rudimentary implementation of glob matching on strings. Right now it only supports "*" that will match zero or more characters anywhere within the string.

func OKPath added in v0.19.0

func OKPath() (string, error)

OKPath returns the root of where packages can be found. This can be provided through the $OKPATH environment variable. However, if its not set (or is empty) then the current directory will be used.

func PackageNameFromPath added in v0.14.2

func PackageNameFromPath(baseDir, packagePath string) string

PackageNameFromPath returns the full package name from a path compared to its base directory.

The baseDir and packagePath may be relative or absolute. If baseDir is empty, then the current working directory is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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