Skip to content
/ commands Public template

Command line interface for your CLI project. This repository contains configuration files and is intended as a template for your codebase. Download these configuration files and include them in your git repository.

License

Notifications You must be signed in to change notification settings

confetti-framework/commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confetti Commands

Use this template for your CLI project. Particularly suitable for a CI project.

This code contains a few files to get started on your CLI project. If you want more functionalities, it is better to use Confetti Framework.

Documentation

Confetti Commands has extensive and thorough documentation, making it a breeze to get started.

Example

package commands

import (
	"src/app/mail_driver"
	"github.com/confetti-framework/framework/inter"
	"io"
)

type SendEmails struct {
	Email string `flag:"email" required:"true"`
}

func (s SendEmails) Name() string {
	return "mail:send"
}

func (s SendEmails) Description() string {
	return "Send a marketing email to a user."
}

func (s SendEmails) Handle(c inter.Cli) inter.ExitCode {
	mailer := mail_driver.DripEmailer{}
	mailer.Send(s.Email)

	c.Info("Email send to: %s", s.Email)

	return inter.Success
}

License

Confetti is open-sourced software licensed under the MIT license.

About

Command line interface for your CLI project. This repository contains configuration files and is intended as a template for your codebase. Download these configuration files and include them in your git repository.

Topics

Resources

License

Stars

Watchers

Forks

Languages