forked from mirrors/homebox
chore: developer cleanup (#300)
* new PR tasks * add homebox to know words * formatting * bump deps * generate db models * ts errors * drop id * fix accessor * drop unused time field * change CI * add expected error * add type check * resolve serveral type errors * hoise in CI
This commit is contained in:
parent
88f9ff90d4
commit
bd321af29f
142 changed files with 817 additions and 1200 deletions
|
@ -4,10 +4,9 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/ardanlabs/conf/v3"
|
||||
|
||||
"os"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -55,7 +54,6 @@ func New() (*Config, error) {
|
|||
const prefix = "HBOX"
|
||||
|
||||
help, err := conf.Parse(prefix, &cfg)
|
||||
|
||||
if err != nil {
|
||||
if errors.Is(err, conf.ErrHelpWanted) {
|
||||
fmt.Println(help)
|
||||
|
@ -71,11 +69,9 @@ func New() (*Config, error) {
|
|||
// This is useful for debugging. If the marshaller errors out, it will panic.
|
||||
func (c *Config) Print() {
|
||||
res, err := json.MarshalIndent(c, "", " ")
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println(string(res))
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue