helper

package
v1.25.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 8 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessErrorForUser

func ProcessErrorForUser(ctx *context.Context, status int, errObj any) string

ProcessErrorForUser logs the error and returns a user-error message for the end user. If the status is http.StatusInternalServerError, the message is stripped for non-admin users in production.

func ServePackageFile added in v1.21.0

func ServePackageFile(ctx *context.Context, s io.ReadSeekCloser, u *url.URL, pf *packages_model.PackageFile, forceOpts ...*context.ServeHeaderOptions)

ServePackageFile the content of the package file If the url is set it will redirect the request, otherwise the content is copied to the response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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