useragent

package
v1.37.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectAIAgent added in v1.37.2

func DetectAIAgent(getEnv func(string) string) string

DetectAIAgent detects if the CLI was invoked by a coding agent, based on well-known env vars. It accepts an environment getter function to allow testing without modifying the actual environment.

func GetEncodedStripeUserAgent

func GetEncodedStripeUserAgent() string

GetEncodedStripeUserAgent returns the string to be used as the value for the `X-Stripe-Client-User-Agent` HTTP header.

func GetEncodedUserAgent

func GetEncodedUserAgent() string

GetEncodedUserAgent returns the string to be used as the value for the `User-Agent` HTTP header.

Types

This section is empty.

Jump to

Keyboard shortcuts

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