Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 945 Bytes

README.md

File metadata and controls

36 lines (32 loc) · 945 Bytes

Kommando Go Report Card

Simple and usable cli tool for golang.

Installation

go get github.com/yigit433/kommando

Example

package main

import (
    "fmt"
    "github.com/yigit433/kommando"
    "github.com/yigit433/kommando/types"
)

func main() {
    app := kommando.NewKommando(types.Config{
        AppName: "Kommando Test App",
    })

    app.AddCommand(
        &types.Command{
            Name:        "test",
            Description: "Hello world test example!",
            Flags:       []types.Flag{
                types.Flag{&[]bool{false}[0], "isbool", "description..", "bool"},
            },
            Aliases:     []string{"t"},
            Execute:     func(res *types.CmdResponse) {
                fmt.Println("Hello world!")
            },
        },
    )

    app.Run()
}