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

imageprefs

package
v1.29.1 Latest Latest
Warning

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

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

Documentation

Overview

Package imageprefs stores only the automatic image-preview preference. It never reads or rewrites the CLI's other configuration or preview cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, path string) (string, error)

Load returns auto when no preference was saved. Unknown or corrupt settings are errors, never implicit permission to activate a terminal image font.

func Save

func Save(ctx context.Context, path string, inline bool) error

Save serializes cooperating writers from validation through atomic replacement. Readers never observe partial JSON. All CLI versions writing this file must retain the same sibling lock, including when introducing a new schema. The advisory lock cannot coordinate external writers that ignore it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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