helpers

package
v0.0.0-...-ab02cf7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnceAMinute = onceAMinute()

Functions

func ExtractRefFromFullRef

func ExtractRefFromFullRef(fullRef string) string

func NormaliseFullRef

func NormaliseFullRef[S string | *string](ref S) string

func NormaliseFullRefPtr

func NormaliseFullRefPtr[S string | *string](ref S) *string

func NormaliseRef

func NormaliseRef[S string | *string](ref S) string

func NormaliseRefPtr

func NormaliseRefPtr[S string | *string](ref S) *string

func Ptr

func Ptr[T any](v T) *T

func RespondHTTP

func RespondHTTP(response Response, err error, rw http.ResponseWriter)

func String

func String(p *string) string

func Truncate

func Truncate(s string, n int) string

Types

type Request

type Request struct {
	Body    string
	Headers map[string]string
}

type Response

type Response struct {
	Body       string
	Headers    map[string]string
	StatusCode int
}

Jump to

Keyboard shortcuts

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