misc

package
v0.0.0-...-d31700d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 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

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

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

func RenderFileTo

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

func RenderFileWithConfig

func RenderFileWithConfig(env, tmplFile, outputFile string) error

func Spec

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

func SpecAll

func SpecAll() error

Types

type Config

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