apply formatting guidelines to existing files
This commit is contained in:
parent
60207beabd
commit
728eed8f8a
|
@ -1,4 +1,4 @@
|
||||||
sqlite3_file: "YetAnotherToDoList.sqlite3"
|
sqlite3_file: 'YetAnotherToDoList.sqlite3'
|
||||||
log_file: "YetAnotherToDoList.log"
|
log_file: 'YetAnotherToDoList.log'
|
||||||
log_UTC: false
|
log_UTC: false
|
||||||
port: 4242
|
port: 4242
|
||||||
|
|
|
@ -5,10 +5,13 @@ Commands were run in the order listed below on a debian based system.
|
||||||
## Initial setup
|
## Initial setup
|
||||||
|
|
||||||
- Initialize go module
|
- Initialize go module
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go mod init somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList
|
go mod init somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList
|
||||||
```
|
```
|
||||||
- Install cobra-cli (try `~/go/bin/cobra-cli` if `cobra-cli` can not be found in your `PATH`)
|
|
||||||
|
- Install cobra-cli (try `~/go/bin/cobra-cli` if `cobra-cli` can not be found in
|
||||||
|
your `PATH`)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go install github.com/spf13/cobra-cli@latest
|
go install github.com/spf13/cobra-cli@latest
|
||||||
|
@ -16,14 +19,19 @@ Commands were run in the order listed below on a debian based system.
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add missing modules
|
- Add missing modules
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go mod tidy
|
go mod tidy
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add license command
|
- Add license command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cobra-cli add license
|
cobra-cli add license
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add qglgen
|
- Add qglgen
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
printf '// +build tools\npackage tools\nimport (_ "github.com/99designs/gqlgen"\n _ "github.com/99designs/gqlgen/graphql/introspection")' | gofmt > tools.go
|
printf '// +build tools\npackage tools\nimport (_ "github.com/99designs/gqlgen"\n _ "github.com/99designs/gqlgen/graphql/introspection")' | gofmt > tools.go
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
@ -31,7 +39,9 @@ Commands were run in the order listed below on a debian based system.
|
||||||
go mod tidy
|
go mod tidy
|
||||||
cobra-cli add server
|
cobra-cli add server
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add go-sqlite3
|
- Add go-sqlite3
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get github.com/mattn/go-sqlite3
|
go get github.com/mattn/go-sqlite3
|
||||||
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3 # you may need to install gcc if not already present
|
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3 # you may need to install gcc if not already present
|
||||||
|
|
19
INSTALL.md
19
INSTALL.md
|
@ -8,7 +8,8 @@ include_toc: true
|
||||||
## Requirements:
|
## Requirements:
|
||||||
|
|
||||||
- go 1.21.1 (not tested, but _should_ also work in all versions since 1.16)
|
- go 1.21.1 (not tested, but _should_ also work in all versions since 1.16)
|
||||||
- gcc 4.6+ (according to the [golang wiki](https://github.com/golang/go/wiki/MinimumRequirements#cgo))
|
- gcc 4.6+ (according to the
|
||||||
|
[golang wiki](https://github.com/golang/go/wiki/MinimumRequirements#cgo))
|
||||||
|
|
||||||
## Install via `go install`
|
## Install via `go install`
|
||||||
|
|
||||||
|
@ -18,11 +19,13 @@ When installing via this method, no commit & version information is provided.
|
||||||
go install somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList@latest
|
go install somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
You can specify the installation location by adding `GOBIN=<installation directory>`
|
You can specify the installation location by adding
|
||||||
|
`GOBIN=<installation directory>`
|
||||||
|
|
||||||
## Install from git repository (Recommended)
|
## Install from git repository (Recommended)
|
||||||
|
|
||||||
In addition to the [requirements](#requirements), you will need `git` and `GNU make`
|
In addition to the [requirements](#requirements), you will need `git` and
|
||||||
|
`GNU make`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList.git
|
git clone https://somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList.git
|
||||||
|
@ -45,7 +48,9 @@ There are currently no pre-build binaries available
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
If you get an error like `Unable to connect: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub`, make sure `gcc` is installed and in your `PATH`.
|
If you get an error like
|
||||||
|
`Unable to connect: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub`,
|
||||||
|
make sure `gcc` is installed and in your `PATH`.
|
||||||
|
|
||||||
If this still does not work, try
|
If this still does not work, try
|
||||||
|
|
||||||
|
@ -73,7 +78,8 @@ YetAnotherToDoList help completion <bash|zsh|fish|powershell>
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
Edit the file [.YetAnotherToDoList.yaml](./.YetAnotherToDoList.yaml) and run `YetAnotherToDoList help` for options.
|
Edit the file [.YetAnotherToDoList.yaml](./.YetAnotherToDoList.yaml) and run
|
||||||
|
`YetAnotherToDoList help` for options.
|
||||||
|
|
||||||
## Uninstall
|
## Uninstall
|
||||||
|
|
||||||
|
@ -83,7 +89,8 @@ Run `make uninstall` or
|
||||||
rm $HOME/.local/bin/YetAnotherToDoList # replace with your installation path
|
rm $HOME/.local/bin/YetAnotherToDoList # replace with your installation path
|
||||||
```
|
```
|
||||||
|
|
||||||
Don't forget to delete the `.log`, `.yaml` and `.sqlite3` files if you don't need them any more.
|
Don't forget to delete the `.log`, `.yaml` and `.sqlite3` files if you don't
|
||||||
|
need them any more.
|
||||||
|
|
||||||
### Remove shell completion
|
### Remove shell completion
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
# YetAnotherToDoList
|
# YetAnotherToDoList
|
||||||
|
|
||||||
A simple To Do List Web Application with Go backend, Vue.js frontend and a GraphQL API.
|
A simple To Do List Web Application with Go backend, Vue.js frontend and a
|
||||||
|
GraphQL API.
|
||||||
|
|
||||||
This is a simple project I created to learn the [Go](https://go.dev/) language, [GraphQL](https://graphql.org/) and [Vue.js](https://vuejs.org).
|
This is a simple project I created to learn the [Go](https://go.dev/) language,
|
||||||
|
[GraphQL](https://graphql.org/) and [Vue.js](https://vuejs.org).
|
||||||
|
|
||||||
Instructions on how to install can be found in [INSTALL.md](./INSTALL.md).
|
Instructions on how to install can be found in [INSTALL.md](./INSTALL.md).
|
||||||
|
|
||||||
Once installed, you might want to run the queries in [example.graphql](./example.graphql).
|
Once installed, you might want to run the queries in
|
||||||
|
[example.graphql](./example.graphql).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ resolver:
|
||||||
layout: follow-schema
|
layout: follow-schema
|
||||||
dir: graph
|
dir: graph
|
||||||
package: graph
|
package: graph
|
||||||
filename_template: "{name}.resolvers.go"
|
filename_template: '{name}.resolvers.go'
|
||||||
# Optional: turn on to not generate template comments above resolvers
|
# Optional: turn on to not generate template comments above resolvers
|
||||||
# omit_template_comment: false
|
# omit_template_comment: false
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ resolver:
|
||||||
# gqlgen will search for any type names in the schema in these go packages
|
# gqlgen will search for any type names in the schema in these go packages
|
||||||
# if they match it will use them, otherwise it will generate them.
|
# if they match it will use them, otherwise it will generate them.
|
||||||
autobind:
|
autobind:
|
||||||
- "somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model"
|
- 'somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList/graph/model'
|
||||||
|
|
||||||
# This section declares type mapping between the GraphQL and go type systems
|
# This section declares type mapping between the GraphQL and go type systems
|
||||||
#
|
#
|
Loading…
Reference in New Issue