This commit is contained in:
2025-07-19 13:12:35 -04:00
commit 1af1c0a132
6 changed files with 56 additions and 0 deletions

0
.gitignore vendored Normal file
View File

17
.vscode/launch.json vendored Normal file
View File

@@ -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}",
}
]
}

25
README.md Normal file
View File

@@ -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`

12
cmd/app1/main.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import (
"fmt"
)
//go:generate
func main() {
fmt.Println("App1")
}

1
internal/pkg1/pkg1.go Normal file
View File

@@ -0,0 +1 @@
package pkg1

View File

@@ -0,0 +1 @@
package pkg1