utils

package
v0.0.0-...-43b0d33 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TagMap

type TagMap struct {
	// contains filtered or unexported fields
}

TagMap stores the ec2 tags as a map and provides some convenience methods.

func TagSliceToMap

func TagSliceToMap(tags []*ec2.Tag) TagMap

TagSliceToMap takes a slice of *ec2.Tags and returns a mapping of their key -> value.

func (*TagMap) Get

func (tm *TagMap) Get(key string) (string, bool)

Get gets the tag with the given key and whether or not it exists

func (*TagMap) GetDefault

func (tm *TagMap) GetDefault(key string, defaultValue string) string

GetDefault returns the value of the tag matching the given key. If there is no tag matching the key, it returns the default value.

Jump to

Keyboard shortcuts

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