Documentation ¶
Index ¶
- Variables
- func Basename(pwd string) string
- func CheckDocker() error
- func CheckDockerImage(goVersion string) (bool, error, string)
- func CommadString(os []OSData, isVendor, isCGO bool, packageName, outDir string) (commad []string)
- func CompressFile(filename string) ([]byte, error)
- func DecompressHex(hexdata []byte) ([]byte, error)
- func DecompressHexString(hexdata string) ([]byte, error)
- func FindGoFiles(directory string) ([]string, error)
- func GeneratePackFileString(assetBundle *ReferencedAssets, ignoreErrors bool) (string, error)
- func GetBuildGitID() string
- func GetBuildTime() string
- func GetGoVersion() string
- func GetMewnFiles(args []string, ignoreErrors bool) []string
- func HasMewnReference(filename string) (bool, error)
- func ParserArch(arch string, lists []string) []string
- func ParserTarget(cross string) []string
- func PullDockerImage(image string) error
- func TargetsCommad(target string) map[string][]string
- type AssetDirectory
- type AssignStmt
- type CallStmt
- type FileGroup
- func (f *FileGroup) AddAsset(name, data string) error
- func (f *FileGroup) AddByteAsset(name string, data []byte) error
- func (f *FileGroup) All() map[string][]byte
- func (f *FileGroup) Bytes(filename string) []byte
- func (f *FileGroup) Entries() []string
- func (f *FileGroup) GetBaseDir() string
- func (f *FileGroup) MustBytes(filename string) (contents []byte, err error)
- func (f *FileGroup) MustString(filename string) (string, error)
- func (f *FileGroup) Reset()
- func (f *FileGroup) String(filename string) string
- type Group
- type OSData
- type ReferencedAsset
- type ReferencedAssets
Constants ¶
This section is empty.
Variables ¶
var DockerDist = "seekwe/go-builder:"
Functions ¶
func CheckDocker ¶
func CheckDocker() error
func CommadString ¶
func CompressFile ¶
CompressFile reads the given file and converts it to a gzip compressed hex string
func DecompressHex ¶ added in v1.0.15
DecompressHex decompresses the gzip/hex encoded data
func DecompressHexString ¶
DecompressHexString decompresses the gzip/hex encoded data
func FindGoFiles ¶
FindGoFiles finds all go files recursively from the given directory
func GeneratePackFileString ¶
func GeneratePackFileString(assetBundle *ReferencedAssets, ignoreErrors bool) (string, error)
GeneratePackFileString creates the contents of a pack file
func GetBuildGitID ¶ added in v1.0.10
func GetBuildGitID() string
func GetBuildTime ¶ added in v1.0.10
func GetBuildTime() string
func GetGoVersion ¶ added in v1.0.10
func GetGoVersion() string
func GetMewnFiles ¶
func HasMewnReference ¶
func ParserArch ¶
func ParserTarget ¶
func PullDockerImage ¶
func TargetsCommad ¶
Types ¶
type AssetDirectory ¶
AssetDirectory is a collection of file groups
func NewAssetDirectory ¶
func NewAssetDirectory() *AssetDirectory
NewAssetDirectory creates a new asset directory
func (*AssetDirectory) GetGroup ¶
func (a *AssetDirectory) GetGroup(groupName string) *FileGroup
GetGroup gets a filegroup by name. Returns nil if not found
func (*AssetDirectory) NewFileGroup ¶
func (a *AssetDirectory) NewFileGroup(baseDirectory string) (*FileGroup, error)
NewFileGroup creates a new file group
type AssignStmt ¶
AssignStmt holds data about an assignment
func ParseAssignment ¶
func ParseAssignment(astmt *ast.AssignStmt) *AssignStmt
ParseAssignment parses an assignment statement
func (*AssignStmt) String ¶
func (a *AssignStmt) String() string
type FileGroup ¶
type FileGroup struct {
// contains filtered or unexported fields
}
FileGroup holds a collection of files
func (*FileGroup) AddByteAsset ¶ added in v1.0.15
AddAsset to the FileGroup
func (*FileGroup) Bytes ¶
Bytes returns the asset as a Byte slice. Failure is indicated by a blank slice. If you need hard failures, use MustBytes.
func (*FileGroup) GetBaseDir ¶
func (*FileGroup) MustBytes ¶
MustBytes returns the asset as a string. If the asset doesn't exist, it hard fails
func (*FileGroup) MustString ¶
MustString returns the asset as a string. If the asset doesn't exist, it hard fails
type ReferencedAsset ¶
ReferencedAsset holds the information for an asset referenced by the user
type ReferencedAssets ¶
type ReferencedAssets struct { Caller string PackageName string BaseDir string Assets []*ReferencedAsset Groups []*Group }
ReferencedAssets is a collection of assets referenced from a file
func GetReferencedAssets ¶
func GetReferencedAssets(filenames []string) ([]*ReferencedAssets, error)
GetReferencedAssets gets a list of referenced assets from the AST
func (*ReferencedAssets) HasAsset ¶
func (r *ReferencedAssets) HasAsset(name string) bool
HasAsset returns true if the given asset name has already been processed for this asset group