utils

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDirExists

func EnsureDirExists(filename string) error

ensures the given directory exists for the filename used by JsonStore and InsecureStore

func GetHomePath

func GetHomePath(path string) string

GetHomePath returns the absolute path of the provided path with the first ~ replaced with the location of the users home directory and the path rewritten for the host operating system

func HandleUrl

func HandleUrl(action, browser, url, pre, post string) error

Prints, opens or copies to clipboard the given URL

func MakeRoleARN

func MakeRoleARN(account int64, name string) string

Creates an AWS ARN for a role

func ParseRoleARN

func ParseRoleARN(arn string) (int64, string, error)

ParseRoleARN parses an ARN representing a role in long or short format

func ParseTimeString

func ParseTimeString(t string) (int64, error)

func TimeRemain

func TimeRemain(expires int64, space bool) (string, error)

Returns the MMm or HHhMMm

Types

This section is empty.

Jump to

Keyboard shortcuts

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