versiontest

package
v0.0.0-...-6166138 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package versiontest contains helpers to aid testing code that interacts with version attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSingle

func ParseSingle(s string) (version.AttrSet, error)

ParseSingle parses the given string and returns the corresponding version attribute composed of one key and its value. The key and the value are space separated. The key and the value of the version attribute are trimmed. Examples:

SomeKey some value until the end of the string
SomeKey "some quoted \"value\" with no trailing data"
SomeKey `a backtick "quoted" value`

func ParseString

func ParseString(s string) (version.AttrSet, error)

Parse parses the given string and returns the corresponding version attribute. Keys and values are space separated. Examples:

Bundle
Redirect name
Redirect name Bundle

func String

func String(attr version.AttrSet) string

String returns a string representation of the given type that is compatible with ParseString. For any given dt, dt.Equal(Must(ParseString(String(dt))))

Types

This section is empty.

Jump to

Keyboard shortcuts

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