Content-Length: 279200 | pFad | http://github.com/nfx/slrp/pull/142/commits/9fd0f54c4f1fd0c42916f24aee080bd51fbe98f3

AE Fix configuration reporting by nfx · Pull Request #142 · nfx/slrp · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configuration reporting #142

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix configuration reporting
  • Loading branch information
nfx committed Jul 30, 2023
commit 9fd0f54c4f1fd0c42916f24aee080bd51fbe98f3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ coverage.txt
slrp
package-lock.json
.vagrant
*.patch
14 changes: 6 additions & 8 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,13 @@ func getConfig() (configuration, error) {
validLoc = loc
break
}
os.Stderr.WriteString(fmt.Sprintf("Loading config: %s\n", validLoc))
data := configuration{}
err = yaml.Unmarshal(raw, &data)
if err != nil {
return nil, fmt.Errorf("invalid config in %s: %w", validLoc, err)
}
if data == nil {
// when there's no config
data = configuration{}
if validLoc != "" {
os.Stderr.WriteString(fmt.Sprintf("Loading config: %s\n", validLoc))
err = yaml.Unmarshal(raw, &data)
if err != nil {
return nil, fmt.Errorf("invalid config in %s: %w", validLoc, err)
}
}
for _, raw := range os.Environ() {
rawSplit := strings.SplitN(raw, "=", 2)
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/nfx/slrp/pull/142/commits/9fd0f54c4f1fd0c42916f24aee080bd51fbe98f3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy