config

package
v0.8.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigEnv = "default"

DefaultConfigEnv is the name of the environment, which is taken as default unless another value is passed.

View Source
const DefaultConfigName = "rcon.yaml"

DefaultConfigName sets the default config file name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config map[string]session.Session

Config allows to take a remote server address and password from the configuration file. This enables not to specify these flags when running the CLI.

Example: ```yaml default:

address: "127.0.0.1:16260"
password: "password"

```.

func GetConfig added in v0.8.1

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

GetConfig finds and parses config file for details of connecting to a remote server.

func ReadYamlConfig

func ReadYamlConfig(path string) (cfg Config, err error)

ReadYamlConfig reads config data from yaml file.

Jump to

Keyboard shortcuts

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