misc

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 28 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 RenderFileWithConfig added in v1.0.9

func RenderFileWithConfig(env, tmplFile, outputFile string) error

func Spec

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

func SpecAll

func SpecAll() error

Types

type Config added in v1.1.2

type Config struct {
	Mailer  string   `yaml:"mailer"`
	Keepers []string `yaml:"keepers"`

	Loops        uint
	Addrs        []string `yaml:"addrs"`
	SlowResponse uint16   `yaml:"slowResponse"`
}

Directories

Path Synopsis
dbs

Jump to

Keyboard shortcuts

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