config

package
v0.0.0-...-78b7714 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LeagueConfig = []leagueData{
	{
		LeagueCode: "BL1",
		LeagueName: "1. Bundesliga",
		Country:    "Germany",
	},
	{
		LeagueCode: "PL",
		LeagueName: "Premier League",
		Country:    "England",
	},
	{
		LeagueCode: "PD",
		LeagueName: "La Liga",
		Country:    "Spain",
	},
}

Functions

func CodeNotFound

func CodeNotFound()

CodeNotFound used when the user enters an unknown flag code. It prints the available codes to stdout and exits (1)

func GetLeagueCodes

func GetLeagueCodes() [][]string

GetLeagueCodes returns the leagues and their codes

func GetTeamCodesForWriter

func GetTeamCodesForWriter() [][]string

GetTeamCodesForWriter returns the teams and their codes

func GetTeamConfigPath

func GetTeamConfigPath() string

GetTeamConfigPath returns the path to the teams.yml config file

func ResetTeamConfigFile

func ResetTeamConfigFile(filename string) error

ResetTeamConfigFile truncates the team config yaml file

Types

type TeamInfoConfig

type TeamInfoConfig struct {
	LeagueCode string
	TeamName   string
	TeamId     string
}

TeamInfoConfig holds the team information

func NewTeamConfig

func NewTeamConfig(teamCode string) *TeamInfoConfig

NewTeamConfig returns a new TeamInfoConfig, populated based on the input of the arg teamCode

Jump to

Keyboard shortcuts

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