Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GenerateCommand = &cli.Command{ Name: "generate", Description: "Generates new readme", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "hide-unsolved", Value: false, Destination: &config.HideUnsolvedProblems, Usage: "Do not include unsolved problems in generated README", }, }, Action: func(ctx *cli.Context) error { gen, err := readme.NewGenerator(config) if err != nil { return fmt.Errorf("failed to create generator: %w", err) } if err := gen.GenerateReadme(context.Background()); err != nil { return err } log.Info("readme successfully generated") return nil }, }
View Source
var InitCommand = &cli.Command{ Name: "init", Description: "Initializes project", Action: func(ctx *cli.Context) error { filename := ctx.String("config") _, err := os.Stat(filename) if os.IsNotExist(err) { logger.WithField("file", filename).Info(boldStyle.Render("creating config file")) return createConfigFile() } if err == nil { logger.Info(boldStyle.Render("configuration already initialized")) return nil } return fmt.Errorf("failed to check config file: %w", err) }, }
View Source
var ProblemAddCommand = &cli.Command{ Name: "add", Usage: "add new problem to solved list", Action: func(ctx *cli.Context) error { log.Info(boldStyle.Render("adding new problem")) return nil }, }
View Source
var ProblemCommand = &cli.Command{ Name: "problem", Usage: "manage problems", Subcommands: cli.Commands{ ProblemAddCommand, }, }
Functions ¶
func CreateDefaultConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.