Created
December 10, 2022 19:30
-
-
Save dastanaron/4eeae24fbb450ae89ffd46c57c7fc4ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORK_DIR=`dirname ${0}` | |
PROJECT_NAME=${1} | |
mkdir ${PROJECT_NAME} | |
cd "${WORK_DIR}/${PROJECT_NAME}" | |
mkdir src | |
mkdir build | |
mkdir data | |
touch Makefile | |
echo "APP_NAME=${PROJECT_NAME} | |
compile: | |
cd src; GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o ../build/\${APP_NAME} ." >> Makefile | |
echo "package main | |
func main() { | |
} | |
" >> ./src/main.go | |
touch .gitignore | |
echo " | |
build | |
data" >> .gitignore | |
git init | |
git add ./ | |
git commit -m "Init project" | |
codium . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment