utils

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: BSD-3-Clause Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSONParam added in v1.4.0

func GetJSONParam(f *pflag.FlagSet, name string) (map[string]any, error)

func GetPartialUpdateParam added in v1.4.0

func GetPartialUpdateParam(f *pflag.FlagSet) (stream.PartialUpdate, error)

func GetStringSliceParam added in v1.4.0

func GetStringSliceParam(f *pflag.FlagSet, name string) ([]string, error)

func PrintObject

func PrintObject(cmd *cobra.Command, object interface{}) error

func S3BucketAndRegionFromUploadURL added in v1.10.0

func S3BucketAndRegionFromUploadURL(raw string) (bucket, region string, err error)

S3BucketAndRegionFromUploadURL derives the S3 bucket and region from a presigned PUT URL. It handles virtual-hosted–style hosts (bucket.s3.region.amazonaws.com, bucket.s3.amazonaws.com) and falls back to the region embedded in X-Amz-Credential when the host is non-standard (e.g. S3 Transfer Acceleration).

func UploadToS3 added in v1.10.0

func UploadToS3(ctx context.Context, filename, url string) error

UploadToS3 uploads a local file to the given S3 presigned URL via HTTP PUT. When stderr is a TTY, a progress bar is rendered so large uploads are not opaque.

Types

This section is empty.

Jump to

Keyboard shortcuts

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