scratch

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

GitHub Actions CI Status Codebeat badge GitHub Actions CodeQL Status

Usage demoInstallationCommand-line completionUsageContributingLicense


scratch is a simple utility for generating blank files for Go apps, utilities and packages.

Installation

From sources

To install the scratch from sources, make sure you have a working Go 1.19+ workspace (instructions), then:

go install github.com/essentialkaos/scratch

Command-line completion

You can generate completion for bash, zsh or fish shell.

Bash:

sudo scratch --completion=bash 1> /etc/bash_completion.d/scratch

ZSH:

sudo scratch --completion=zsh 1> /usr/share/zsh/site-functions/scratch

Fish:

sudo scratch --completion=fish 1> /usr/share/fish/vendor_completions.d/scratch.fish

Man documentation

You can generate man page for scratch using next command:

scratch --generate-man | sudo gzip > /usr/share/man/man1/scratch.1.gz

Usage

Usage: scratch {options} template dir

Options

  --no-color, -nc    Disable colors in output
  --help, -h         Show this help message
  --version, -v      Show version

Examples

  scratch package
  List files in template "package"

  scratch package .
  Generate files based on template "package" in current directory

  scratch service $GOPATH/src/github.com/essentialkaos/myapp
  Generate files based on template "service" in given directory

Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
templates

Jump to

Keyboard shortcuts

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