cmd

package
v0.0.0-...-2cc8177 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2022 CallanBi <mcbihv@126.com>

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "leetecho-cli",
	Short: "A cli tool for Leetecho",
	Long: `A cli tool for leetecho.

Leetecho(GUI) is an elegant, experience-friendly product that
automatically generates LeetCode solutions and notes and
publishes them to personal repositories on code hosting platforms.
Leetecho-cli simply implements basic functionality in Leetecho,
such as publishing problems and notes according to
the configured template, login and logout, and
checking updates.
	`,
}

rootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

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

func IsLogin

func IsLogin() bool

func Login

func Login()

func Unset

func Unset(vars ...string) error

func WipeConfig

func WipeConfig() (ok bool)

Types

type CfgParams

type CfgParams map[string]string

type ValidatorMap

type ValidatorMap map[string]func(string) error

func (ValidatorMap) Validate

func (v ValidatorMap) Validate(key string, value string) error

func (ValidatorMap) ValidateAll

func (v ValidatorMap) ValidateAll(m *CfgParams) error

Jump to

Keyboard shortcuts

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