diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 18:53:56 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-02 18:53:56 +0200 |
| commit | f6c7a85ca04b9285677227d66205856c31a7d364 (patch) | |
| tree | a343eacc23b8cbd7013fcf7318258ad657962867 /backend/config.go | |
| parent | cc2f31d6d5f47472e7162c9aec605587f0abaad8 (diff) | |
feat(backend): config header links
Diffstat (limited to 'backend/config.go')
| -rw-r--r-- | backend/config.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backend/config.go b/backend/config.go index 15cc585..5e6620b 100644 --- a/backend/config.go +++ b/backend/config.go @@ -8,16 +8,32 @@ import ( "github.com/pelletier/go-toml/v2" ) +type Link struct { + Name string `toml:"name"` + URL string `toml:"url"` +} + type Config struct { Domain string `toml:"domain"` Name string `toml:"name"` Description string `toml:"description"` + Links []Link `toml:"links"` } func (c *Config) DefaultValues() { c.Domain = "example.org" c.Name = "example" c.Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut." + c.Links = []Link{ + { + Name: "Home", + URL: "/", + }, + { + Name: "Logs", + URL: "/log/", + }, + } } func LoadConfig(path string) (*Config, bool) { |
