utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL_RUN_PREFIX       = "**Run URL**: "
	URL_RUN_SUFFIX       = "<br>"
	URL_RUN_GROUP_PREFIX = `<details><summary>

### Previous TFC Urls:

</summary>

| Run ID | Status | Created at |
| ------ | ------ | ---------- |`
	URL_RUN_GROUP_SUFFIX  = "</details>"
	URL_RUN_STATUS_PREFIX = "**Status**: "
)

We format the URL as **RUN URL**: <url> <br> under tfc_status_update.go

Variables

View Source
var ErrPermanent = errors.New("permanent error. cannot be retried")

Functions

func CaptureSubstring added in v0.2.0

func CaptureSubstring(body string, prefix string, suffix string) string

func CreatePermanentError

func CreatePermanentError(err error) error

CreatePermanentError will return a permanent error with the string contents of the passed in error

func EmitPermanentError

func EmitPermanentError(err error, handler EmitHandler) error

EmitPermanentError will execute the handler if the error is Permanent and return nil. Otherwise it will return the passed in error.

func FormatStatus added in v0.2.0

func FormatStatus(status string) string

AI generated these, may not be compresphenive

Types

type EmitHandler

type EmitHandler func(err error)

Jump to

Keyboard shortcuts

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