process

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DependencePrefix = "Do not delete this list! It is used to populate the following lists:"
)

Variables

View Source
var (
	ErrCycleDependence = errors.New("cycle dependence")
	ErrListNotFound    = errors.New("not found")
)

Functions

func AddDependences

func AddDependences(l *c1ews.ListResponse, name ...string)

AddDependences - add dependence line or modify one of it already exists

func AddToTheList

func AddToTheList(l *c1ews.ListResponse, items []string)

AddToTheList - add items to the list avoiding duplicates and sort them

func Cleanup

func Cleanup(l *c1ews.ListResponse)

Cleanup - remove all items if list has includes

func ClearDependence

func ClearDependence(l *c1ews.ListResponse)

ClearDependence - remove dependence lines from description if exist any

func Equal

func Equal(a, b *c1ews.ListResponse) bool

Equal - return true if there is a difference between lists. We are checking only fileds that could be changed by TMList

func HasIncludes

func HasIncludes(l *c1ews.ListResponse) bool

HasIncludes - return true if list has includes

func Includes

func Includes(l *c1ews.ListResponse) (result []string)

Includes - list all includes of the list

func ListDependencies

func ListDependencies(l *c1ews.ListResponse) (result []string)

ListDependencies - return all dependencies for given list

func ListFromResponse

func ListFromResponse(response *c1ews.ListResponse) *c1ews.List

ListFromResponse - return List struct build from ListResponse struct

func RemoveDuplicates

func RemoveDuplicates(names []string) (result []string)

RemoveDuplicates - remove duplicates from string slice. Return in sorted order

Types

type Process

type Process struct {
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(in []c1ews.ListResponse) *Process

func (*Process) FindList

func (p *Process) FindList(name string) *c1ews.ListResponse

func (*Process) FindListWithError added in v0.5.0

func (p *Process) FindListWithError(name string) (*c1ews.ListResponse, error)

func (*Process) GetAllItems

func (p *Process) GetAllItems(l *c1ews.ListResponse) error

func (*Process) GetAllItemsWithMap

func (p *Process) GetAllItemsWithMap(l *c1ews.ListResponse, seen map[string]struct{}) error

func (*Process) IterateChanged

func (p *Process) IterateChanged(callback func(*c1ews.ListResponse) error) error

func (*Process) ListNotFoundError added in v0.5.0

func (p *Process) ListNotFoundError(name string) error

func (*Process) Process

func (p *Process) Process() error

Jump to

Keyboard shortcuts

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