commit 1af1c0a13235af4a0a3653bcf5e49aad35361446 Author: william harbert Date: Sat Jul 19 13:12:35 2025 -0400 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b58349b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Debug cmd/web", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/cmd/app1", + //"showLog": true, + "cwd": "${workspaceFolder}", + } + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..8180547 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Go Application Template + +## Structure +my-app/ +├── cmd/ +│ └── app1/ # Individual target binary. Duplicate as needed +│ ├── app1.go +│ └── app1_test.go +└── internal/ + └── pkg1/ # Internal use package. Duplicate as needed + ├── pgk1.go + └── pgk1_test.go + +## Use +- `git clone git.develent.net/wiharb/go-template-app.git` +- `rm -rf ./.git` +- Rename and duplicate `cmd/app1` and `internal/pkg1` as needed +- `go mod init [package_name]` +- Update `./.vscode/launch.json::"program"` to the correct binary path(s) +- Reinitialize git + - `git init` + - `git add .` + - `git commit -m "init"` + - `git remote add origin http://[user]:[token]@git.develenet.net/wiharb/[repo].git` + - `git push -u origin master` diff --git a/cmd/app1/main.go b/cmd/app1/main.go new file mode 100644 index 0000000..f72ecba --- /dev/null +++ b/cmd/app1/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" +) + +//go:generate + +func main() { + fmt.Println("App1") + +} diff --git a/internal/pkg1/pkg1.go b/internal/pkg1/pkg1.go new file mode 100644 index 0000000..f2aa7d4 --- /dev/null +++ b/internal/pkg1/pkg1.go @@ -0,0 +1 @@ +package pkg1 diff --git a/internal/pkg1/pkg1_test.go b/internal/pkg1/pkg1_test.go new file mode 100644 index 0000000..f2aa7d4 --- /dev/null +++ b/internal/pkg1/pkg1_test.go @@ -0,0 +1 @@ +package pkg1