misc

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmds

func Cmds(rootCmd *cobra.Command) []*cobra.Command

func DomainAncestor added in v1.0.4

func DomainAncestor(domain string, n int) string

DomainAncestor return the N'th ancestor of domain

Example
fmt.Println(DomainAncestor(`a.b.c.com`, 0))
fmt.Println(DomainAncestor(`a.b.c.com`, 1))
fmt.Println(DomainAncestor(`a.b.c.com`, 2))
fmt.Println(DomainAncestor(`a.b.c.com`, 3))
fmt.Println(DomainAncestor(`a.b.c.com`, 4))
Output:

a.b.c.com
b.c.com
c.com
com
com

func RenderFile added in v1.0.2

func RenderFile(tmplFile string, data interface{}) (bytes.Buffer, error)

func RenderFileTo added in v1.0.2

func RenderFileTo(tmplFile string, data interface{}, outputFile string) error

func RenderFileWithEnvConfig added in v1.0.2

func RenderFileWithEnvConfig(env, tmplFile, outputFile string) error

func Spec

func Spec(targets []string, onlyChanged bool) error

func SpecAll

func SpecAll() error

Types

This section is empty.

Directories

Path Synopsis
dbs

Jump to

Keyboard shortcuts

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