Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Expand the admin status page into an operational dashboard

4506a4d3d279556435fdd414265e7499c3dada16 · Keenan Nemetz · 14d ago · parent 2e024cc9

forge/config/config.go +6−1

@@ -91,7 +91,11 @@ type Config struct {
91 91 // warning at startup. Never enable it on a shared instance.
92 92 DevLogin string `toml:"dev_login"`
93 93
94 Path string `toml:"-"`
94 // Path is the file Load was asked to read. Loaded reports whether it found a
95 // non-empty file there; false means the built-in defaults are in use, which
96 // the status page shows to an instance admin.
97 Path string `toml:"-"`
98 Loaded bool `toml:"-"`
95 99 }
96 100
97 101 func defaults() *Config {
@@ -122,6 +126,7 @@ func Load(path string) (*Config, error) {
122 126 if _, err := toml.DecodeFile(path, c); err != nil {
123 127 return nil, fmt.Errorf("config %s: %w", path, err)
124 128 }
129 c.Loaded = true
125 130 } else if err != nil && !os.IsNotExist(err) {
126 131 return nil, err
127 132 }