mirror of
https://github.com/gmemstr/pogo.git
synced 2024-09-20 01:31:09 +01:00
Comment fixes
This commit is contained in:
parent
102b4211b0
commit
69a121aefa
|
@ -2,10 +2,10 @@
|
||||||
"AdminUsername": "",
|
"AdminUsername": "",
|
||||||
"AdminPassword": "",
|
"AdminPassword": "",
|
||||||
"MediaDirectory": "podcasts/",
|
"MediaDirectory": "podcasts/",
|
||||||
"Name": "Git Galaxy Stargazers",
|
"Name": "Git Galaxy Podcast",
|
||||||
"Host": "Gabriel Simmer",
|
"Host": "Gabriel Simmer",
|
||||||
"Email": "gabriel@gitgalaxy.com",
|
"Email": "gabriel@gitgalaxy.com",
|
||||||
"Description": "open source discussion",
|
"Description": "Discussion about open source projects on the internet.",
|
||||||
"Image": "localhost:8000/assets/podcast_image.png",
|
"Image": "localhost:8000/assets/podcast_image.png",
|
||||||
"PodcastUrl": "http://localhost:8000"
|
"PodcastUrl": "http://localhost:8000"
|
||||||
}
|
}
|
|
@ -13,8 +13,9 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"io"
|
"io"
|
||||||
"os" // ioOS?
|
"os" // ioOS?
|
||||||
)
|
|
||||||
|
|
||||||
|
"github.com/spf13/viper"
|
||||||
|
)
|
||||||
// Write custom CSS to disk or send it back to the client if GET
|
// Write custom CSS to disk or send it back to the client if GET
|
||||||
func CustomCss(w http.ResponseWriter, r *http.Request) {
|
func CustomCss(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method == "POST" {
|
if r.Method == "POST" {
|
||||||
|
|
|
@ -21,6 +21,12 @@ import (
|
||||||
|
|
||||||
// Watch folder for changes, called from webserver.go
|
// Watch folder for changes, called from webserver.go
|
||||||
func watch() {
|
func watch() {
|
||||||
|
viper.SetConfigName("config")
|
||||||
|
viper.AddConfigPath(".")
|
||||||
|
err := viper.ReadInConfig() // Find and read the config file
|
||||||
|
if err != nil { // Handle errors reading the config file
|
||||||
|
panic(fmt.Errorf("Fatal error config file: %s \n", err))
|
||||||
|
}
|
||||||
watcher, err := fsnotify.NewWatcher()
|
watcher, err := fsnotify.NewWatcher()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
|
@ -74,7 +74,6 @@ func BasicAuth(handler http.HandlerFunc,) http.HandlerFunc {
|
||||||
w.Write([]byte("Unauthorised.\n"))
|
w.Write([]byte("Unauthorised.\n"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
handler(w, r)
|
handler(w, r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue