ukargparse

package
v0.6.1-11-gcb7622a Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param interface {
	// The canonical name of the parameter which is understood by Unikraft.
	Name() string

	// Set the value of the parameter.
	Set(string)

	// Get the value of the parameter.
	Value() string

	// String returns the fully qualified parameter ready to be accepted by
	// Unikraft.
	String() string

	// A method-chain mechanism for both setting and getting the Param with the
	// newly embedded value.
	WithValue(string) Param
}

func ParamStr

func ParamStr(lib string, name string, value *string) Param

ParamStr instantiates a new Param based on a string value.

type Params

type Params []Param

func Parse

func Parse(args ...string) (Params, error)

Parse accepts varadic length position argument args which represent Unikraft command-line arguments and returns structured Params.

func (Params) Contains

func (params Params) Contains(needle Param) bool

Contains checks whether the provided needle exists within the existing set of Params.

func (Params) Strings

func (params Params) Strings() []string

Strings returns all parameters and their string representation which is ready to be accepted by Unikraft.

Jump to

Keyboard shortcuts

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