argutil

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

The argutil package contains libraries for parsing commandline args.

Index

Constants

This section is empty.

Variables

View Source
var ErrMultiVersion = fmt.Errorf("at most 1 version permitted")

Functions

func ParseDirVersion

func ParseDirVersion(dirVer string) (string, string, error)

ParseDirVersion parses given string of the form dir@verion and returns dir and version.

func ParseDirVersionWithDefaults

func ParseDirVersionWithDefaults(dirVer string) (string, string, error)

ParseDirVersionWithDefaults parses given string of the form dir@version and returns dir and version with following defaults. if dir is missing, return current working directory if version is missing, return "master"

func ParseFieldPath

func ParseFieldPath(path string) ([]string, error)

ParseFieldPath parse a flag value into a field path TODO(pwittrock): Extract this into lib.kpt.dev

func ResolveSymlink(ctx context.Context, path string) (string, error)

ResolveSymlink returns the resolved symlink path for the input path

Types

This section is empty.

Jump to

Keyboard shortcuts

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