config

package
v0.0.0-...-09a8973 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2022 Shubh Karman Singh <sksingh2211@gmail.com> All rights reserved. This Project is under BSD-3 License Clause. Look at License for more detail.

Copyright © 2022 Shubh Karman Singh <sksingh2211@gmail.com> All rights reserved. This Project is under BSD-3 License Clause. Look at License for more detail.

Copyright © 2022 Shubh Karman Singh <sksingh2211@gmail.com> All rights reserved. This Project is under BSD-3 License Clause. Look at License for more detail.

Copyright © 2022 Shubh Karman Singh <sksingh2211@gmail.com> All rights reserved. This Project is under BSD-3 License Clause. Look at License for more detail.

Index

Constants

This section is empty.

Variables

View Source
var (
	YastWorkDir       string
	DefaultConfigPath string
)
View Source
var ConfigJsonExists bool
View Source
var PlayerChoiceFromTui string

Functions

func CreateConfigJSON

func CreateConfigJSON() (*os.File, error)

func CreateYastWorkDir

func CreateYastWorkDir() error

func FillConfigJSON

func FillConfigJSON(configFile *os.File, configBS *ConfigBuildSpec) error

func GetExistingTargetFromConfig

func GetExistingTargetFromConfig() (string, error)

func GetPlayerFromExistingConfig

func GetPlayerFromExistingConfig() (string, error)

func RemoveConfigJSON

func RemoveConfigJSON() error

func SetupYast

func SetupYast() error

func UpdateConfigJSON

func UpdateConfigJSON(playerChange bool, targetChange bool, reset bool) error

Types

type ConfigBuildSpec

type ConfigBuildSpec struct {
	Player           string `json:"player"`
	TargetPreference string `json:"target-preference"`
	QueryHistory     bool   `json:"query-history"`
}

This function will call interactive tui for taking input of user preferences.

func GetConfigBSFromSetupModel

func GetConfigBSFromSetupModel() (ConfigBuildSpec, error)

func NewConfigBuildSpec

func NewConfigBuildSpec() *ConfigBuildSpec

Jump to

Keyboard shortcuts

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