Skip to content

Commit

Permalink
Use github.com/xyproto/env v2
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jun 3, 2023
1 parent e0771b4 commit 1d4b0f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion engine/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/xyproto/algernon/themes"
"github.com/xyproto/algernon/utils"
"github.com/xyproto/datablock"
"github.com/xyproto/env"
"github.com/xyproto/env/v2"
)

// Parse the flags, return the default hostname
Expand Down
2 changes: 1 addition & 1 deletion engine/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/xyproto/algernon/lua/jnode"
"github.com/xyproto/algernon/lua/pure"
"github.com/xyproto/ask"
"github.com/xyproto/env"
"github.com/xyproto/env/v2"
lua "github.com/xyproto/gopher-lua"
"github.com/xyproto/textoutput"
)
Expand Down
4 changes: 2 additions & 2 deletions engine/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/caddyserver/certmagic"
log "github.com/sirupsen/logrus"
"github.com/tylerb/graceful"
"github.com/xyproto/env"
"github.com/xyproto/env/v2"
"golang.org/x/net/http2"
)

Expand Down Expand Up @@ -167,7 +167,7 @@ func (ac *Config) Serve(mux *http.ServeMux, done, ready chan bool) error {
// If $XDG_CONFIG_DIR is not set, use $HOME.
// If $HOME is not set, use $TMPDIR.
// If $TMPDIR is not set, use /tmp.
certStorageDir := env.Str("XDG_CONFIG_DIR", env.Str("HOME", env.Str("TMPDIR", "/tmp")))
certStorageDir := env.StrAlt("XDG_CONFIG_DIR", "HOME", env.Str("TMPDIR", "/tmp"))

defaultEmail := env.Str("LOGNAME", "root") + "@localhost"
if len(ac.certMagicDomains) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/wellington/sass v0.0.0-20160911051022-cab90b3986d6
github.com/xyproto/ask v1.0.2
github.com/xyproto/datablock v0.0.0-20190619140322-71fb859bdac7
github.com/xyproto/env v1.9.1
github.com/xyproto/env/v2 v2.0.0
github.com/xyproto/gluamapper v1.2.1
github.com/xyproto/gopher-lua v1.0.2
github.com/xyproto/jpath v0.6.1
Expand Down Expand Up @@ -83,7 +83,7 @@ require (
github.com/shopspring/decimal v1.3.1 // indirect
github.com/xyproto/cookie v0.0.0-20210319112338-2e0ffd4b75a9 // indirect
github.com/xyproto/cookie/v2 v2.2.3 // indirect
github.com/xyproto/env/v2 v2.0.0 // indirect
github.com/xyproto/env v1.9.1 // indirect
github.com/xyproto/randomstring v1.0.5 // indirect
github.com/xyproto/simplehstore v1.8.1 // indirect
github.com/xyproto/simplemaria v0.0.0-20220902075651-6f3efad9ec98 // indirect
Expand Down

0 comments on commit 1d4b0f2

Please sign in to comment.