utils

package
v1.1.1-0...-acba925 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tnone = iota
	Ttesting
)

Variables

View Source
var Mode int

Functions

func BaseMetadataPath

func BaseMetadataPath(home string) string

BaseMetadataPath returns the path to where all metadata is synced

func BaseProjectPath

func BaseProjectPath(home string) string

BaseProjectPath returns the path to where all git projects are synced

func Exit

func Exit(code int)

func ExpandPath

func ExpandPath(path string) string

func FixtureDir

func FixtureDir() (fixturedir string)

func LatestVersion

func LatestVersion(versions ...string) string

func SQL2fmt

func SQL2fmt(sql string) (out string)

SQL2fmt converts ? into %s and appends a newline to the string if it doesn't exist.

func TempDir

func TempDir() (tempdir string)

func Touch

func Touch(filename string) error

Touch touches a file

Types

type ByVersion

type ByVersion []string

func (ByVersion) Len

func (v ByVersion) Len() int

func (ByVersion) Less

func (v ByVersion) Less(i, j int) bool

func (ByVersion) Swap

func (v ByVersion) Swap(i, j int)

type URLx

type URLx struct {
	URL     string
	Scheme  string
	Project string
	Host    string
	Path    string
}

URLx take a URI or Something Specific to this project and break it into parts

func Parse

func Parse(uri string) (*URLx, error)

Parse parses a URL or the like and returns a URLx pointer or nil if the parser failed to match a string.

func (*URLx) Parse

func (ux *URLx) Parse(url string) error

Parse parses a URL or the link sets its internal attributes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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