aliases: take template for newgo alias
This commit is contained in:
@@ -9,13 +9,17 @@ mc() {
|
|||||||
|
|
||||||
newgo() {
|
newgo() {
|
||||||
dir="$1"
|
dir="$1"
|
||||||
|
template="$2"
|
||||||
|
if [ -z "$template" ]; then
|
||||||
|
template="pkgm"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
cd $dir
|
cd $dir
|
||||||
|
|
||||||
go mod init $1
|
go mod init $1
|
||||||
|
|
||||||
nap go/pkgm >main.go
|
nap go/$template >main.go
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -A aliases=(
|
declare -A aliases=(
|
||||||
|
|||||||
Reference in New Issue
Block a user