Help us shape the future of Go! Take the 2026 Go Developer Survey

profiles

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package profiles loads and filters the agent profiles acurl fetches with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() ([]types.Profile, error)

Default returns the embedded default profiles.

func Filter

func Filter(profiles []types.Profile, names []string) []types.Profile

Filter returns the profiles whose names match one of names (case-insensitive). An empty names list returns all profiles.

func FilterCategories added in v0.2.0

func FilterCategories(ps []types.Profile, categories []string) []types.Profile

FilterCategories keeps profiles in one of categories, plus the browser baseline so that comparisons still work. Empty categories keep everything.

func Load

func Load(path string) ([]types.Profile, error)

Load reads profiles from path, or the embedded defaults when path is empty.

func Parse

func Parse(data []byte) ([]types.Profile, error)

Parse decodes and validates a profiles YAML document.

func WithoutRobotsOnly added in v0.2.0

func WithoutRobotsOnly(ps []types.Profile) []types.Profile

WithoutRobotsOnly drops robots.txt-only tokens, which mean nothing when robots.txt is not checked.

Types

type File

type File struct {
	Profiles []types.Profile `yaml:"profiles"`
}

File is the on-disk layout of a profiles YAML file.

Jump to

Keyboard shortcuts

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