lib

package
v2.0.0-...-c54351c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoGuidance

func AutoGuidance(err error) []string

func ConnectionAssertion

func ConnectionAssertion(host string, port int) string

func GetHost

func GetHost(args Args, fallback string) string

func IsLocal

func IsLocal(ip net.IP) bool

func IsRoot

func IsRoot() bool

func SplitHostAndPort

func SplitHostAndPort(hostname string) (string, int)

Types

type Args

type Args struct {
	V4             bool
	V6             bool
	TimeoutSeconds int
	Host           string
}

type Result

type Result struct {
	Status    Status
	Check     string
	Assertion string
	Guidance  []string
}

func ResultByError

func ResultByError(check string, assertion string, err error, extraGuidance []string) Result

func ToResult

func ToResult(status Status, check string, assertion string, guidance []string) Result

type Status

type Status int
const (
	Ok          Status = 0
	Warn        Status = 1
	Error       Status = 2
	NotExecuted Status = 3
)

func AutoErrorType

func AutoErrorType(err error) Status

Jump to

Keyboard shortcuts

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