internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

View Source
var Emojis = []EmojiConf{
	{"🎨", ":art:", "Improve structure / format of the code.", CommitTypeStyle},
	{"⚑️", ":zap:", "Improve performance.", CommitTypeFeat},
	{"πŸ”₯", ":fire:", "Remove code or files.", CommitTypeRelease},
	{"πŸ›", ":bug:", "Fix a bug.", CommitTypeFix},
	{"πŸš‘οΈ", ":ambulance:", "Critical hotfix.", CommitTypeHotfix},
	{"✨", ":sparkles:", "Introduce new features.", CommitTypeFeat},
	{"πŸ“", ":memo:", "Add or update documentation.", CommitTypeDocs},
	{"πŸš€", ":rocket:", "Deploy stuff.", CommitTypeDeploy},
	{"πŸŽ‰", ":tada:", "Begin a project.", CommitTypeChore},
	{"βœ…", ":white_check_mark:", "Add, update, or pass tests.", CommitTypeTest},
	{"πŸ”’οΈ", ":lock:", "Fix security issues.", CommitTypeFix},
	{"πŸ”–", ":bookmark:", "Release / Version tags.", CommitTypeRelease},
	{"🚨", ":rotating_light:", "Fix compiler / linter warnings.", CommitTypeStyle},
	{"🚧", ":construction:", "Work in progress.", CommitTypeFeat},
	{"πŸ’š", ":green_heart:", "Fix CI Build.", CommitTypeChore},
	{"⬇️", ":arrow_down:", "Downgrade dependencies.", CommitTypeChore},
	{"⬆️", ":arrow_up:", "Upgrade dependencies.", CommitTypeChore},
	{"πŸ“Œ", ":pushpin:", "Pin dependencies to specific versions.", CommitTypeChore},
	{"πŸ‘·", ":construction_worker:", "Add or update CI build system.", CommitTypeChore},
	{"πŸ“ˆ", ":chart_with_upwards_trend:", "Add or update analytics or track code.", CommitTypeFeat},
	{"♻️", ":recycle:", "Refactor code.", CommitTypeRefactor},
	{"βž•", ":heavy_plus_sign:", "Add a dependency.", CommitTypeChore},
	{"βž–", ":heavy_minus_sign:", "Remove a dependency.", CommitTypeChore},
	{"πŸ”§", ":wrench:", "Add or update configuration files.", CommitTypeChore},
	{"πŸ”¨", ":hammer:", "Add or update development scripts.", CommitTypeChore},
	{"🌐", ":globe_with_meridians:", "Internationalization and localization.", CommitTypeFeat},
	{"✏️", ":pencil2:", "Fix typos.", CommitTypeFix},
	{"πŸ’©", ":poop:", "Write bad code that needs to be improved.", CommitTypeFeat},
	{"βͺ️", ":rewind:", "Revert changes.", CommitTypeRevert},
	{"πŸ“¦οΈ", ":package:", "Add or update compiled files or packages.", CommitTypeChore},
	{"πŸ‘½οΈ", ":alien:", "Update code due to external API changes.", CommitTypeFeat},
	{"🚚", ":truck:", "Move or rename resources (e.g.: files, paths, routes).", CommitTypeRevert},
	{"πŸ“„", ":page_facing_up:", "Add or update license.", CommitTypeChore},
	{"πŸ’₯", ":boom:", "Introduce breaking changes.", CommitTypeChore},
	{"🍱", ":bento:", "Add or update assets.", CommitTypeChore},
	{"πŸ’‘", ":bulb:", "Add or update comments in source code.", CommitTypeChore},
	{"πŸ’¬", ":speech_balloon:", "Add or update text and literals.", CommitTypeChore},
	{"πŸ”Š", ":loud_sound:", "Add or update logs.", CommitTypeRefactor},
	{"πŸ”‡", ":mute:", "Remove logs.", CommitTypeRefactor},
	{"πŸ‘₯", ":busts_in_silhouette:", "Add or update contributor(s).", CommitTypeChore},
	{"🀑", ":clown_face:", "Mock things.", CommitTypeTest},
	{"πŸ™ˆ", ":see_no_evil:", "Add or update a .gitignore file.", CommitTypeChore},
	{"πŸ“Έ", ":camera_flash:", "Add or update snapshots.", CommitTypeChore},
	{"πŸ—‘οΈ", ":wastebasket:", "Deprecate code that needs to be cleaned up.", CommitTypeRefactor},
	{"🩹", ":adhesive_bandage:", "Simple fix for a non-critical issue.", CommitTypeFix},
	{"⚰️", ":coffin:", "Remove dead code.", CommitTypeRefactor},
	{"πŸ§ͺ", ":test_tube:", "Add a failing test.", CommitTypeTest},
}

Emojis from: https://gitmoji.dev/ CommitType from: https://sparkbox.com/foundry/semantic_commit_messages https://www.conventionalcommits.org/en/v1.0.0/

Functions ΒΆ

func InText ΒΆ

func InText(key, text string) bool

func Input ΒΆ

func Input(title string) (string, error)

func ReadFromArgs ΒΆ added in v0.3.0

func ReadFromArgs(args []string, name string) ([]string, string)

func Select ΒΆ

func Select(title string, items []string) (int, error)

Types ΒΆ

type CommitType ΒΆ

type CommitType string
const (
	CommitTypeFeat     CommitType = "feat"     // new feature for the user, not a new feature for build script
	CommitTypeRevert   CommitType = "revert"   // revert some feat or test or config
	CommitTypeFix      CommitType = "fix"      // bug fix for the user, not a fix to a build script
	CommitTypeHotfix   CommitType = "hotfix"   // buf hotfix, may skip code review or test
	CommitTypeDocs     CommitType = "docs"     // changes to the documentation
	CommitTypeStyle    CommitType = "style"    // formatting, missing semi colons, etc; no production code change
	CommitTypeRefactor CommitType = "refactor" // refactoring production code, eg. renaming a variable
	CommitTypeTest     CommitType = "test"     // adding missing tests, refactoring tests; no production code change
	CommitTypeChore    CommitType = "chore"    // updating grunt tasks etc; no production code change
	CommitTypeRelease  CommitType = "release"  // release new tag
	CommitTypeDeploy   CommitType = "deploy"   // deploy code to test or production env
)

type EmojiConf ΒΆ

type EmojiConf struct {
	Emoji      string
	Text       string
	Desc       string
	CommitType CommitType
}

func SelectEmoji ΒΆ

func SelectEmoji() (EmojiConf, error)

Jump to

Keyboard shortcuts

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