profiles

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 5 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

Overview

Package profiles holds the built-in browser profiles, one embedded JSON file per browser version and platform, taken from captures of the real browser. Each is checked once, on first use, and every accessor returns that one read-only profile.Profile: calling one costs nothing, and a client built from it copies nothing. Edit a copy with Profile.With. Chrome, Firefox and Safari track each browser's newest version on macOS; an accessor named for the browser and another platform, such as ChromeWindows, tracks the newest on that platform and exists once that platform has a profile (decision 0047). Versioned accessors (Chrome156MacOS) stay fixed. The accessors are generated by cmd/profilegen (go generate ./profiles).

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByName

func ByName(name string) (profile.Profile, error)

ByName returns the built-in profile called name, for example "chrome-155-macos".

Example

Pick the profile a task names in its configuration.

package main

import (
	"fmt"
	"log"

	"github.com/roachadam/mimicry"
	"github.com/roachadam/mimicry/profiles"
)

func main() {
	p, err := profiles.ByName("safari-27-macos")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(p.Name())

	if _, err := mimicry.NewClient(mimicry.Config{
		Profile: p,
	}); err != nil {
		log.Fatal(err)
	}

	_, err = profiles.ByName("chrome-133")
	fmt.Println(err)

}
Output:
safari-27-macos
profiles: "chrome-133" is not a built-in profile

func Chrome155MacOS

func Chrome155MacOS() profile.Profile

Chrome155MacOS returns the chrome-155-macos profile (chrome 155 on macos).

func Chrome156MacOS

func Chrome156MacOS() profile.Profile

Chrome156MacOS returns the chrome-156-macos profile (chrome 156 on macos).

func Chrome156Windows

func Chrome156Windows() profile.Profile

Chrome156Windows returns the chrome-156-windows profile (chrome 156 on windows).

func ChromeMacOS added in v0.2.0

func ChromeMacOS() profile.Profile

ChromeMacOS returns the newest chrome profile on macos, now chrome-156-macos (chrome 156 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func ChromeWindows

func ChromeWindows() profile.Profile

ChromeWindows returns the newest chrome profile on windows, now chrome-156-windows (chrome 156 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func Firefox158MacOS

func Firefox158MacOS() profile.Profile

Firefox158MacOS returns the firefox-158-macos profile (firefox 158 on macos).

func Firefox158Windows added in v0.2.0

func Firefox158Windows() profile.Profile

Firefox158Windows returns the firefox-158-windows profile (firefox 158 on windows).

func FirefoxMacOS added in v0.2.0

func FirefoxMacOS() profile.Profile

FirefoxMacOS returns the newest firefox profile on macos, now firefox-158-macos (firefox 158 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func FirefoxWindows added in v0.2.0

func FirefoxWindows() profile.Profile

FirefoxWindows returns the newest firefox profile on windows, now firefox-158-windows (firefox 158 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func Names

func Names() []string

Names lists every built-in profile, deprecated ones included.

func Safari26IOS added in v0.2.0

func Safari26IOS() profile.Profile

Safari26IOS returns the safari-26-ios profile (safari 26 on ios).

func Safari26MacOS

func Safari26MacOS() profile.Profile

Safari26MacOS returns the safari-26-macos profile (safari 26 on macos).

func Safari27IOS added in v0.2.0

func Safari27IOS() profile.Profile

Safari27IOS returns the safari-27-ios profile (safari 27 on ios).

func Safari27MacOS

func Safari27MacOS() profile.Profile

Safari27MacOS returns the safari-27-macos profile (safari 27 on macos).

func SafariIOS added in v0.2.0

func SafariIOS() profile.Profile

SafariIOS returns the newest safari profile on ios, now safari-27-ios (safari 27 on ios). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func SafariMacOS added in v0.2.0

func SafariMacOS() profile.Profile

SafariMacOS returns the newest safari profile on macos, now safari-27-macos (safari 27 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.

func Supported

func Supported() []string

Supported lists the built-in profiles that are not deprecated: the newest five versions of each browser on each platform (decision 0035).

Types

This section is empty.

Jump to

Keyboard shortcuts

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