Skip to content

HuTa0kj/GoTStarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoTStarter

GoTStarter is a scaffold for quickly building terminal tools. It is equipped with basic functions such as command line parameter parsing, log output, configuration file loading, and code file compilation.

The project is based on Go 1.23

git clone [email protected]:HuTa0kj/GoTStarter.git
cd GoTStarter

You can execute the initialization script to replace the package name you currently need to develop.

chmod 777 ./rename.sh
./rename.sh

The first time you execute Origin Module, you need to fill in gotstarter.

Origin Module Name(Such as gotstarter): gotstarter
New Module Name(Such as myproject): <Your Module Name>

Configure environment variables in .env.

cp .env.example .env

Get the value of a variable at any time.

os.Getenv("TOOL_DESC")

You can test it by executing the command.

go run ./cmd/gotstarter/main.go -i input-test -d

Compile into a binary file.

./build.sh

The same effect as you can see.

./gotstarter-linux -i input-test -d

   ______    ___________ __             __           
  / ____/___/_  __/ ___// /_____ ______/ /____  _____
 / / __/ __ \/ /  \__ \/ __/ __ */ ___/ __/ _ \/ ___/
/ /_/ / /_/ / /  ___/ / /_/ /_/ / /  / /_/  __/ /
\____/\____/_/  /____/\__/\__,_/_/   \__/\___/_/     0.0.2

[INF] [2025-06-06T18:18:48+08:00] Debug mode enabled
[INF] [2025-06-06T18:18:48+08:00] Read Config Successful
[DBG] [2025-06-06T18:18:48+08:00] Initialization completed
[INF] [2025-06-06T18:18:48+08:00] input-test
[INF] [2025-06-06T18:18:48+08:00] Task Completed

You can generate your favorite banner icon, tool name, and more.

About

A Go-based tool scaffolding for rapid development of terminal tools.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors