fix finish-template-setup.sh
This commit is contained in:
parent
7403470ff3
commit
71bf3e2fad
2 changed files with 3 additions and 7 deletions
|
@ -6,12 +6,7 @@ This is a template for go projects. It provides a postgres database connection a
|
|||
|
||||
This template is intended for use with [gonew](https://go.dev/blog/gonew), but can also be manually copied and the package name updated.
|
||||
|
||||
After you run gonew or update the package name manually, you will also want to:
|
||||
|
||||
* search for the string `go-project-template` and replace it with the name of your project, as that string appears in a few places other than the package name itself.
|
||||
* Rename the sample config file in the root from `go-project-template.sample.json`
|
||||
* You might want to put a human-readable project name in `httpserver/templates/base.html`, where `go-project-template` appears multiple times.
|
||||
* Rewrite this README
|
||||
After you run gonew or update the package name manually, you will also want to run `./finish-template-setup.sh` and update this README.
|
||||
|
||||
## Project Usage
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ set -exuo pipefail
|
|||
|
||||
name="$(basename $(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd))"
|
||||
|
||||
mv go-projet-template.sample.json "${name}.sample.json"
|
||||
sed -i "s#go-project-template.sample#${name}#g" README.md
|
||||
mv go-project-template.sample.json "${name}.sample.json"
|
||||
mv cmd/go-project-template "cmd/${name}"
|
||||
|
||||
rm -rf finish-template-setup.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue