utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBearerToken added in v1.1.0

func ExtractBearerToken(auth string) string

ExtractBearerToken extracts the token from a "Bearer <token>" authorization header.

func MaskSecret added in v1.1.0

func MaskSecret(s string) string

MaskSecret masks the middle of a secret string, revealing a small prefix and suffix for identification. The number of characters revealed scales with string length.

func PtrTo

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

PtrTo returns a reference to v.

Types

type ConcurrentGroup

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

ConcurrentGroup is like errgroup.Group but differs in that an error in one goroutine will not interrupt the functioning of another. See https://pkg.go.dev/golang.org/x/sync/errgroup#Group.Go.

func NewConcurrentGroup

func NewConcurrentGroup() *ConcurrentGroup

func (*ConcurrentGroup) Go

func (c *ConcurrentGroup) Go(fn func() error)

func (*ConcurrentGroup) Wait

func (c *ConcurrentGroup) Wait() error

Jump to

Keyboard shortcuts

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