utils

package
v0.0.0-...-45bfe4e Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditCreateTextFile

func EditCreateTextFile(path string, editors ...TextEditFunc) error

func EditTextFile

func EditTextFile(path string, editors ...TextEditFunc) error

func ReplaceTextTags

func ReplaceTextTags(text, startTag, endTag, replace string) (string, error)

Types

type Maintainer

type Maintainer struct {
	Name     string   `yaml:"name"`
	Github   string   `yaml:"github"`
	Company  string   `yaml:"company"`
	Projects []string `yaml:"projects"`
}

type Maintainers

type Maintainers []Maintainer

func ReadMaintainersFromFile

func ReadMaintainersFromFile(path string) (Maintainers, error)

type Repositories

type Repositories []Repository

func ReadRepositoriesFromFile

func ReadRepositoriesFromFile(path string) (Repositories, error)

type Repository

type Repository struct {
	Name        string           `yaml:"name"`
	Description string           `yaml:"description,omitempty"`
	Scope       RepositoryScope  `yaml:"scope"`
	Status      RepositoryStatus `yaml:"status,omitempty"`
}

func (*Repository) URL

func (r *Repository) URL() string

type RepositoryScope

type RepositoryScope string
const (
	RepositoryScopeCore      RepositoryScope = "Core"
	RepositoryScopeEcosystem RepositoryScope = "Ecosystem"
	RepositoryScopeInfra     RepositoryScope = "Infra"
	RepositoryScopeSpecial   RepositoryScope = "Special"
)

func (RepositoryScope) String

func (r RepositoryScope) String() string

type RepositoryStatus

type RepositoryStatus string
const (
	RepositoryStatusStable     RepositoryStatus = "Stable"
	RepositoryStatusIncubating RepositoryStatus = "Incubating"
	RepositoryStatusSandbox    RepositoryStatus = "Sandbox"
	RepositoryStatusDeprecated RepositoryStatus = "Deprecated"
)

func (RepositoryStatus) String

func (r RepositoryStatus) String() string

type TextEditFunc

type TextEditFunc func(string) (string, error)

Jump to

Keyboard shortcuts

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