cmd

package
v0.0.0-...-7b52623 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.`,
}
View Source
var Version = "0.1.2"

bump version for bug fixes and features not-backward-compatible.new-feature.bug fixes

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Wait

func Wait(length int, block func(index int))

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

func (config *Config) SetFromArgs(args []string)

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.

Directories

Path Synopsis
storage

Jump to

Keyboard shortcuts

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