pkgm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(list []string, match string) bool

Loops through the list and returns true if an item matches the string.

Returns true if the item matched our string. False if not.

func NewOperation

func NewOperation(opType string, packages []string, flags []string, autoInstall bool) operation

Creates a new operation struct that is used to request a transaction.

After creating a operation, run yourOperation.Process() to install/delete/etc

Accepted types: ("add", "del", "update", "upgrade", "search")

func ParseArguments

func ParseArguments(arguments []string) (*[]string, *[]string)

Splits packages from flags in string arrays.

Returns a tuple with packages first, and the flags. (&packages, &flags)

Useful for parsing the packages & flags from Cobra

func Read

func Read(data []byte) (operation, error)

Parses a bytes list and returns aan operation and an error.

func RemoveDuplicates

func RemoveDuplicates(appendList *[]string, baseList *[]string) []string

Returns a new array based on `baseList` without anything repeated on the append list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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