cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BindFile = `
package main

import (
    _ "gomatcha.io/bridge"
    _ "%s"
)

import "C"

func main() {}
`

Functions

func ArchClang

func ArchClang(goarch string) string

func Bind

func Bind(flags *Flags, args []string) error

func Build

func Build(flags *Flags, args []string) error

func CopyDir

func CopyDir(f *Flags, dst, src string) error

func CopyDirContents

func CopyDirContents(f *Flags, dst, src string) error

func CopyFile

func CopyFile(f *Flags, dst, src string) error

func Darwin386Env

func Darwin386Env(f *Flags) ([]string, error)

func DarwinAmd64Env

func DarwinAmd64Env(f *Flags) ([]string, error)

func DarwinArm64Env

func DarwinArm64Env(f *Flags) ([]string, error)

func DarwinArmEnv

func DarwinArmEnv(f *Flags) ([]string, error)

func EnvClang

func EnvClang(flags *Flags, sdkName string) (_clang, cflags string, err error)

Get clang path and clang flags (SDK Path).

func Environ

func Environ(kv []string) []string

environ merges os.Environ and the given "key=value" pairs. If a key is in both os.Environ and kv, kv takes precedence.

func Getenv

func Getenv(env []string, key string) string

func GoBuild

func GoBuild(f *Flags, src string, env []string, ctx build.Context, tmpdir string, args ...string) error

func GoCmd

func GoCmd(f *Flags, subcmd string, srcs []string, env []string, ctx build.Context, tmpdir string, args ...string) error

func GoEnv

func GoEnv(name string) string

Returns the go enviromental variable for name.

func GoInstall

func GoInstall(f *Flags, srcs []string, env []string, ctx build.Context, tmpdir string, args ...string) error

func GoMobilePath

func GoMobilePath() (string, error)

$GOPATH/pkg/gomobile

func GoVersion

func GoVersion(f *Flags) ([]byte, error)

func Import

func Import(ctx *build.Context, path, srcDir string, mode build.ImportMode, pkgs map[string]*build.Package) error

func ImportAll

func ImportAll(ctx *build.Context, paths []string, srcDir string, mode build.ImportMode) (map[string]*build.Package, error)

func Init

func Init(flags *Flags) error

func InstallPkg

func InstallPkg(f *Flags, temporarydir string, pkg string, env []string, args ...string) error

Build package with properties.

func Mkdir

func Mkdir(flags *Flags, dir string) error

func NewTmpDir

func NewTmpDir(f *Flags, path string) (string, error)

Creates a new temporary directory. Don't forget to remove.

func PackageDir

func PackageDir(f *Flags, pkgpath string) (string, error)

Returns the directory for a given package.

func PkgPath

func PkgPath(env []string) (string, error)

$GOPATH/pkg/gomobile/pkg_darwin_arm64

func PrintCmd

func PrintCmd(cmd *exec.Cmd)

func ReadFile

func ReadFile(flags *Flags, filename string) ([]byte, error)

func RemoveAll

func RemoveAll(f *Flags, path string) error

func RunCmd

func RunCmd(f *Flags, tmpdir string, cmd *exec.Cmd) error
func Symlink(flags *Flags, src, dst string) error

func WriteFile

func WriteFile(flags *Flags, filename string, generate func(io.Writer) error) error

func XcodeAvailable

func XcodeAvailable() bool

Types

type Flags

type Flags struct {
	BuildN       bool   // print commands but don't run
	BuildX       bool   // print commands
	BuildV       bool   // print package names
	BuildWork    bool   // use working directory
	BuildGcflags string // -gcflags
	BuildLdflags string // -ldflags
	BuildO       string // output path
	BuildBinary  bool
}

func (*Flags) ShouldPrint

func (f *Flags) ShouldPrint() bool

func (*Flags) ShouldRun

func (f *Flags) ShouldRun() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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