tools

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dest string, workingDir ...string)

func CopyFile

func CopyFile(src, dest string)

func EnsureRepo

func EnsureRepo(root, repo, dir string)

func ExecCollect

func ExecCollect(name string, args ...string) string

func ExecPlain

func ExecPlain(name string, args ...string)

func ExecPlainWith

func ExecPlainWith(f func(*exec.Cmd), name string, args ...string)

func ExecPlainWithWorkingPath

func ExecPlainWithWorkingPath(dir, name string, args ...string)

func Exit

func Exit(a ...string)

func Package

func Package(module string) *debug.Module

func Pkg

func Pkg(pkg string) string

func ReadFile

func ReadFile(path string) []byte

func ReadUA

func ReadUA(name string, out any)

ReadUA regex file by name from https://github.com/matomo-org/device-detector root directory.

Env var DEVICE_DETECTOR_ROOT is used to set the root path.

func Remove

func Remove(path string)

func Root

func Root(pkg string) string

func RootVince

func RootVince() string

func Version

func Version() string

func WriteFile

func WriteFile(path string, data []byte)

Types

type Artifact

type Artifact struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Path  string `json:"path"`
	Os    string `json:"goos"`
	Arch  string `json:"goarch"`
	Extra struct {
		ID           string `json:"id"`
		DockerConfig struct {
			ID string `json:"id"`
		} `json:"DockerConfig"`
	} `json:"extra"`
}

type Artifacts

type Artifacts struct {
	ID        string
	Artifacts []Artifact
}

type MetaData

type MetaData struct {
	Name    string    `json:"project_name"`
	Tag     string    `json:"tag"`
	Version string    `json:"version"`
	Commit  string    `json:"commit"`
	Date    time.Time `json:"date"`
}

type Project

type Project struct {
	Meta      MetaData
	Artifacts []*Artifacts
}

func Release

func Release(root string) (p Project)

type Table

type Table struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

Table generates nice looking markdown tables

func (*Table) Flush

func (t *Table) Flush()

func (*Table) Init

func (t *Table) Init(header ...string) *Table

func (*Table) Row

func (t *Table) Row(entries ...string)

Directories

Path Synopsis
DO NOT EDIT Code generated by referrer/make_referrer.go
DO NOT EDIT Code generated by referrer/make_referrer.go

Jump to

Keyboard shortcuts

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