Skip to content

Commit

Permalink
add SITE_OWNER.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Aug 14, 2021
1 parent 2b6757d commit 3bb1c40
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (
)

type Settings struct {
Host string `envconfig:"HOST" default:"0.0.0.0"`
Port string `envconfig:"PORT" required:"true"`
Domain string `envconfig:"DOMAIN" required:"true"`
Secret string `envconfig:"SECRET" required:"true"`
Host string `envconfig:"HOST" default:"0.0.0.0"`
Port string `envconfig:"PORT" required:"true"`
Domain string `envconfig:"DOMAIN" required:"true"`
Secret string `envconfig:"SECRET" required:"true"`
SiteOwner string `envconfig:"SITE_OWNER" required:"true"`
}

var s Settings
Expand Down Expand Up @@ -50,7 +51,7 @@ func main() {
router.Path("/").HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("content-type", "text/html")
fmt.Fprintf(w, html)
fmt.Fprintf(w, html+"<p>offered by %s</p>", s.SiteOwner)
},
)

Expand Down

0 comments on commit 3bb1c40

Please sign in to comment.