safeguard

package
v0.10.7-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package safeguard provides types and methods for dealing with safeguards keywords.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyword

type Keyword string

Keyword is a safeguard keyword.

const (
	All            Keyword = "all"
	None           Keyword = "none"
	Git            Keyword = "git"
	GitUntracked   Keyword = "git-untracked"
	GitUncommitted Keyword = "git-uncommitted"
	GitOutOfSync   Keyword = "git-out-of-sync"
	Outdated       Keyword = "outdated-code"
)

Available keywords.

func (Keyword) IsValid

func (k Keyword) IsValid() bool

IsValid checks if k is valid.

type Keywords

type Keywords []Keyword

Keywords is list of ketywords.

func FromStrings

func FromStrings(strs []string) (Keywords, error)

FromStrings constructs a Keywords list out of a list of strings.

func (Keywords) Has

func (ks Keywords) Has(target ...Keyword) bool

Has tell if target exists in the list of keywords.

func (Keywords) Validate

func (ks Keywords) Validate() error

Validate the keywords.

Jump to

Keyboard shortcuts

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