config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "v0.1.1"
)

Variables

View Source
var GoCheatOptions = Options{}

global options object

Functions

func CreateConfig

func CreateConfig() (string, error)

Ensures ~/.config/gocheat/config.json is created with the template and returns the filepath

func Init

func Init()

Create config if they dont exist and read it into GoCheatOptions

func UpdateConfig

func UpdateConfig() error

updates config.json with the new Values of the GoCheatOptions config object

Types

type ItemWrapper

type ItemWrapper struct {
	Title string `json:"title"`
	Tag   string `json:"tag"`
}

type Options

type Options struct {
	Items  []ItemWrapper `json:"items"`
	Styles ThemeWrapper  `json:"styles"`
}

type ThemeWrapper

type ThemeWrapper struct {
	SubText string `json:"subtext"`
	Accent  string `json:"accent"`
}

Jump to

Keyboard shortcuts

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