Documentation
¶
Overview ¶
Package packages finds files related to a package pattern string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilePath ¶
func FilePath(fs hackpadfs.FS, workingDirectory, filePattern string, options Options) (pkgFile string, err error)
FilePath finds a package file's relative path inside the 'workingDirectory' of 'fs'.
Pass a file package pattern like "github.com/org/mymodule/myfile.go" or "./mymodule/myfile.go". If you would like to include more sources for the current Go build context, customize them with 'options'.
Types ¶
type Options ¶
type Options struct { // GoRoot sets a custom GOROOT on the current build context. // Defaults to no root. Paths are relative to the 'fs'. GoRoot string // GoPath appends custom GOPATH elements on the current build context. // Defaults to including the current Go Module in a pseudo-GOPATH directory. Paths are relative to the 'fs'. GoPath string }
Options contains configurable options for calls to FilePath()
Click to show internal directories.
Click to hide internal directories.