Documentation ¶
Index ¶
- Constants
- Variables
- func DateStringToJiraFormatInLocation(value string, timezone string) (string, error)
- func ExitIfError(err error)
- func Fail(msg string, args ...interface{})
- func Failed(msg string, args ...interface{})
- func FormatDateTimeHuman(dt, format string) string
- func GenerateServerBrowseURL(server, key string) string
- func GetConfigHome() (string, error)
- func GetJiraIssueKey(project, key string) string
- func GetSubtaskHandle(issueType string, issueTypes []*jira.IssueType) string
- func GetTUIStyleConfig() tui.TableStyle
- func Info(msg string) *spinner.Spinner
- func Navigate(server, path string) error
- func NormalizeJiraError(msg string) string
- func ReadFile(filePath string) ([]byte, error)
- func StdinHasData() bool
- func Success(msg string, args ...interface{})
- func Warn(msg string, args ...interface{})
Constants ¶
const ( DateLayout = "2006-01-02" DateTimeLayout = "2006-01-02 15:04:05" ShortDateLayout = "20060102" ShortDateTimeLayout = "20060102150405" )
Supported datetime layouts.
Variables ¶
var ( // ErrInvlalidTimezone is returned if timezone is not in a valid IANA timezone format. ErrInvlalidTimezone = fmt.Errorf("timezone should be a valid IANA timezone, eg: Asia/Kathmandu, Europe/Berlin etc") // ErrorInvalidDateTime is returned when datetime string is invalid. ErrorInvalidDateTime = fmt.Errorf("datetime string should be in a valid format, eg: 2022-01-02 10:10:05 or 2022-01-02") )
Functions ¶
func DateStringToJiraFormatInLocation ¶ added in v1.2.0
DateStringToJiraFormatInLocation parses a standard string to jira compatible RFC3339 datetime format.
func ExitIfError ¶
func ExitIfError(err error)
ExitIfError exists with error message if err is not nil.
func Failed ¶
func Failed(msg string, args ...interface{})
Failed prints failure message in stderr and exits.
func FormatDateTimeHuman ¶
FormatDateTimeHuman formats date time in human readable format.
func GenerateServerBrowseURL ¶ added in v1.4.0
GenerateServerBrowseURL will return the `browse` URL for a given key. The server section can be overridden via `browse_server` in config. This is useful if your API endpoint is separate from the web client endpoint.
func GetConfigHome ¶
GetConfigHome returns the config home directory.
func GetJiraIssueKey ¶
GetJiraIssueKey constructs actual issue key based on given key.
func GetSubtaskHandle ¶ added in v1.0.0
GetSubtaskHandle fetches actual subtask handle. This value can either be handle or name based on the used jira version.
func GetTUIStyleConfig ¶ added in v1.1.0
func GetTUIStyleConfig() tui.TableStyle
GetTUIStyleConfig returns the custom style configured by the user.
func NormalizeJiraError ¶ added in v0.2.0
NormalizeJiraError normalizes error message we receive from jira.
func StdinHasData ¶
func StdinHasData() bool
StdinHasData checks if standard input has any data to be processed.
Types ¶
This section is empty.