core-starter

command module
v0.0.0-...-89e6bca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

CoreStarter

DoNewsCode/core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go. This is a starter template using the DoNewsCode/core framework.

Go Report Card Core Release

Usage

  • 0x01: Generate

You can use the fx command to quickly create a project.

fx create helloworld

Or

When you use Git to generate a project, you need to modify the package name of the project yourself.

git clone https://github.com/DoNewsCode/core-starter.git helloworld
  • 0x02: Config

When you use go run main.go to run the project, the starter uses config.yaml by default. You can use the --config parameter to specify the config file, or use the following command to generate:

cp config.example.yaml config.yaml

When you add other modules, you can use the go run main.go config init -o config.example.yaml re-build the sample config file.

  • 0x03: Happy to coding.

You will see the following directory structure.

├── app
│   ├── commands
│   │   └── example.go
│   └── module.go               # App module
├── docs
│   ├── docsify                 # Docsify: {hostname:port}/docs/docsify
│   ├── swagger                 # Swagger Api: {hostname:port}/docs/swagger
│   └── module.go               # Docs module
├── internal
│   └── bootstrap
│       ├── bootstrap.go
│       ├── bootstrap_test.go
│       ├── root.go
│       ├── option.go
│       └── register.go         # Register global module or dependency
├── .gitignore
├── config.example.yaml         # config example file
├── config.yaml                 # config file
├── go.mod
├── go.sum
├── main.go
└── readme.md

Examples of using other frameworks

Gin

Go Kit

Kratos

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL