This is a dotnet project that helps me with the mundane task of creating a golang backend project from scratch. It uses mostly built-in c# libraries and an external package called CliWrap to perform go commands.
- Clone repository into directory of choice using
git clone <https-repo-link>
. - Navigate to project directory.
- If using the dotnet CLI, you can run
dotnet build
in the terminal to build the projeect, or you can use Visual Studio IDE. - You can run the application by running
dotnet run
with dotnet CLI, click on the run button using Visual Studio IDE, or executing the binary in./bin/Debug/net7.0/GoBackendProjectStarter
{ProjectFolder}/
┣ dtos/
┣ entites/
┣ models/
┣ routes/
┃ ┣ helloHandler.go
┃ ┣ helloRoute.go
┃ ┗ route.go
┣ server/
┃ ┗ server.go
┣ services/
┃ ┣ helloService.go
┃ ┣ helloServiceInterface.go
┃ ┗ service.go
┣ utils/
┃ ┣ config/
┃ ┃ ┗ logger.go
┃ ┗ logger/
┃ ┗ logger.go
┣ .env
┣ .env.example
┣ go.mod
┗ main.go
- How to work with the Cliwrap library to execute shell/bash commands.
- Create a tree data structure and traverse through it iteratively (using a queue) in order to create files and folders.
- How to use c# builtin file systen and directory libraries to create, delete, write, and check existing files and folders.
- Use the ref keyword to pass in string values by reference to a function.
- Automate a boring task I usually have to do from scratch with C#.