mirror of
https://github.com/onyx-and-iris/ignr.git
synced 2025-07-26 22:01:57 +00:00
update usage, header + footer.
This commit is contained in:
parent
11fe797f3f
commit
f51302a945
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
# Generated by ignr-cli: github.com/onyx-and-iris/ignr-cli
|
||||
# Generated by ignr: github.com/onyx-and-iris/ignr
|
||||
|
||||
## Go ##
|
||||
# If you prefer the allow list template instead of the deny list, see community template:
|
||||
@ -36,4 +36,4 @@ go.work.sum
|
||||
# .idea/
|
||||
# .vscode/
|
||||
|
||||
# End of ignr-cli
|
||||
# End of ignr
|
||||
|
6
main.go
6
main.go
@ -18,9 +18,9 @@ var version string // Version of the CLI, set during build time
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands.
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "ignr-cli",
|
||||
Use: "ignr",
|
||||
Short: "A command-line interface for generating .gitignore files",
|
||||
Long: `ignr-cli is a command-line interface for generating .gitignore files.
|
||||
Long: `ignr is a command-line interface for generating .gitignore files.
|
||||
It allows users to easily create and manage .gitignore files for various programming languages and frameworks.
|
||||
You may also list available templates and generate .gitignore files based on those templates.`,
|
||||
SilenceUsage: true,
|
||||
@ -43,7 +43,7 @@ You may also list available templates and generate .gitignore files based on tho
|
||||
}
|
||||
version = strings.Split(info.Main.Version, "-")[0]
|
||||
}
|
||||
fmt.Printf("ignr-cli version: %s\n", version)
|
||||
fmt.Printf("ignr version: %s\n", version)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
4
new.go
4
new.go
@ -97,7 +97,7 @@ func runPrompt(client *github.Client, height int) (*github.Gitignore, error) {
|
||||
|
||||
// commitGitignore writes the content of the selected gitignore template to the .gitignore file.
|
||||
func commitGitignore(content *github.Gitignore, w io.Writer) error {
|
||||
if _, err := fmt.Fprintf(w, "# Generated by ignr-cli: github.com/onyx-and-iris/ignr-cli\n\n## %s ##\n", content.GetName()); err != nil {
|
||||
if _, err := fmt.Fprintf(w, "# Generated by ignr: github.com/onyx-and-iris/ignr\n\n## %s ##\n", content.GetName()); err != nil {
|
||||
return fmt.Errorf("error writing header to file '%s': %w", gitignoreFileName, err)
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ func commitGitignore(content *github.Gitignore, w io.Writer) error {
|
||||
return fmt.Errorf("error writing to file '%s': %w", gitignoreFileName, err)
|
||||
}
|
||||
|
||||
if _, err := fmt.Fprintf(w, "\n# End of ignr-cli\n"); err != nil {
|
||||
if _, err := fmt.Fprintf(w, "\n# End of ignr\n"); err != nil {
|
||||
return fmt.Errorf("error writing footer to file '%s': %w", gitignoreFileName, err)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user