settings

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package settings persists small, single-purpose CLI preferences to the user config dir (~/.config/swarmcli). Today it records only the version at which the user dismissed the startup update notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// DismissedUpdateVersion is the latest-release version at which the user
	// ticked "do not show again for this version" in the startup update
	// notice. A different latest version re-shows the notice.
	DismissedUpdateVersion string `json:"dismissedUpdateVersion,omitempty"`
}

Settings is the persisted CLI preference state.

func Load

func Load() Settings

Load reads the settings file. A missing or unreadable/corrupt file is not an error — it yields the zero value.

func (Settings) Save

func (s Settings) Save() error

Save writes the settings file (0644), creating ~/.config/swarmcli if needed.

Jump to

Keyboard shortcuts

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