Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RootCmd = &cobra.Command{ Use: "(OGI) Offline GitHub Issues", Short: fmt.Sprintf("Offline GitHub Issues (v%s)", Version), Long: `OGI let's you download issues from a GitHub repo's to be made available offline.`, }
var Version = "0.1.2"
bump version for bug fixes and features not-backward-compatible.new-feature.bug fixes
Functions ¶
Types ¶
type Config ¶
type Config struct {
Owner string `yaml:"owner"`
Repo string `yaml:"repo"`
LastUpdated time.Time `yaml:"last_updated"`
}
func LoadConfig ¶
func LoadConfig() *Config
LoadConfig loads the configuration from the .ogi.yml file in the current directory. If the file doesn't exist, or there's an error loading it, it returns a new Config object.
func (*Config) Save ¶
func (c *Config) Save()
TODO make multi repos to call offline to save going into repo folders Save writes the configuration to the .ogi.yml file in the current working directory. This should be called after setting the owner and repo fields.
func (*Config) SetFromArgs ¶
SetFromArgs takes the first argument passed in and assumes it's a repository path in the format of "owner/repo". It splits the path and sets the owner and repo fields, then saves the configuration.