config

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPath

func GetDefaultPath() string

GetDefaultPath returns the best place to save / look-for a config directory. Using this function for both saving and reading config or resources (with the same OS) guarantees that a directory will be found

func SetConfig

func SetConfig(c *Config, path string) error

SetConfig writes a configuration file to the given path

Types

type Config

type Config struct {
	HostURL string `json:"host_url"`
	User    string `json:"user,omitempty"`
	Token   string `json:"auth_token,omitempty"`
}

Config is the padl cli configuration

func GetConfig

func GetConfig(path string) (*Config, error)

GetConfig returns the configuration at a given path

Jump to

Keyboard shortcuts

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