mcli

package module
v0.0.0-...-b96e943 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 3 Imported by: 0

README

MCLI: Your Company's Simplified CLI Tool

This repository hosts an example of a CLI (Command Line Interface) application designed to streamline various daily tasks for engineers within a company. These tasks include deployments, server connections, log retrieval, and more.

Explore the benefits of creating your own CLI tool in your organization in this article: Why You Should Consider Creating Your Own CLI Tool in Your Company.

Getting Started

  1. Fork this repository to customize and add your own commands to meet your specific needs.
  2. Once you're satisfied with your changes, create a new release on GitHub using semantic versioning (e.g., 1.2.3) without a 'v' prefix.
  3. GitHub will automatically build the release, allowing you to download it.
  4. With this setup, your CLI tool will automatically update itself whenever a new release is available. Like magic!

Contributions

Contributions are warmly welcomed! Feel free to contribute to the development of this CLI tool.

License

See the License for details on usage and distribution.

Documentation

Index

Constants

View Source
const (
	DefaultVersion = "0.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Version string
	Config  Config
	Context context.Context
}

func New

func New(version string) (*App, error)

func (*App) IsAutoUpdateEnabled

func (a *App) IsAutoUpdateEnabled() bool

func (*App) IsConfigured

func (a *App) IsConfigured() (bool, error)

func (*App) IsRelease

func (a *App) IsRelease() bool

func (*App) SaveConfig

func (a *App) SaveConfig() error

type Config

type Config struct {
	// PersonalGithubToken stores the personal user token.
	PersonalGithubToken string `yaml:"personal_github_token"`
}

func (*Config) GetGithubToken

func (c *Config) GetGithubToken() string

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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