arguments

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

this package defines and initializes custom types that can be used with the Flag package. these types can be called using the flag.Var() function.

Common Types:

- string array: comma-separated list of strings that can be passed in.

- int array: comma-separated list of ints that can be passed in.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntArray

type IntArray []int

custom type representing an integer slice. this will be used to consume a comma-separated array.

func (*IntArray) Set

func (i *IntArray) Set(value string) (err error)

function designed to set the values of an integer array object. this will take in a string, process it, convert its values into integers, and append them to the new integer array.

func (*IntArray) String

func (i *IntArray) String() (val string)

function designed to return the string representatino of the custom IntArray object. this will process the values in the integer array and pass back a single string.

type StringArray

type StringArray []string

custom type representing a string slice. this will be used to consume a comma-separated array.

func (*StringArray) Set

func (s *StringArray) Set(value string) (err error)

function designed to set the values of the string array object. this will take in a string, process it, and convert it into a string array.

func (*StringArray) String

func (s *StringArray) String() (val string)

function designed to return the string representation of the custom StringArray object. this will process the values in the string array and pass back a single string.

Jump to

Keyboard shortcuts

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