https://github.com/go-spring/gs-init
🔥 [v0.0.3] 创建项目骨架(Create project skeleton)
https://github.com/go-spring/gs-init
Last synced: 8 months ago
JSON representation
🔥 [v0.0.3] 创建项目骨架(Create project skeleton)
- Host: GitHub
- URL: https://github.com/go-spring/gs-init
- Owner: go-spring
- License: apache-2.0
- Created: 2025-07-26T02:30:35.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-10-03T14:24:50.000Z (9 months ago)
- Last Synced: 2025-10-03T16:26:52.666Z (9 months ago)
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# gs-init
`gs-init` is a command-line tool for initializing Go projects. It is based on
the [go-spring/skeleton](https://github.com/go-spring/skeleton) project template, allowing you to quickly create a
well-structured Go project.
## Features
* Create projects based on the [go-spring/skeleton](https://github.com/go-spring/skeleton) template
* Automatically replace module name and package name
* Support specifying a Git branch
* Automatically generate project code
## Installation
* **Recommended way:**
Use the [gs](https://github.com/go-spring/gs) integrated development tool.
* To install this tool individually:
```bash
go install github.com/go-spring/gs-init@latest
```
## Usage
```bash
# Basic usage, module name is required
gs-init --module=github.com/your_name/your_project
# Specify a branch
gs-init --module=github.com/your_name/your_project --branch=main
```
## Flags
* `--module`: Specify the project module name (required)
* `--branch`: Specify the template branch to use, default is `main`
## How It Works
1. Clone the specified branch from the go-spring/skeleton repository
2. Remove the `.git` directory to detach from the template repository
3. Replace placeholders in the template with the actual module name and package name
4. Rename the project directory
5. Run the `gs gen` command to generate project code
## License
This project is licensed under the [Apache License 2.0](LICENSE).