diff options
| author | Jeff Carr <[email protected]> | 2024-02-11 19:26:44 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-11 19:26:44 -0600 |
| commit | 6127ce156f035fa5fb93050bc9838108f11228b7 (patch) | |
| tree | cf8cdbe87b4dbc10636ac8de6e89711459255b25 /main.go | |
| parent | 24c2b897f084e9c659b139e65453f965a9f57a64 (diff) | |
add svg, new repos
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -55,6 +55,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) { findFile(w, "files/index.html") return } + if tmp == "/install.sh" { + findFile(w, "files/install.sh") + return + } if tmp == "/me" { j, err := dumpJsonClient(r) if err != nil { @@ -75,6 +79,10 @@ func okHandler(w http.ResponseWriter, r *http.Request) { findFile(w, "files/test.html") return } + if tmp == "/goReference.svg" { + findFile(w, "files/goReference.svg") + return + } if tmp == "/skeleton.v2.css" { findFile(w, "files/skeleton.v2.css") return @@ -95,6 +103,9 @@ func findFile(w http.ResponseWriter, filename string) { var repohtml string repohtml = string(pfile) + if filename == "files/goReference.svg" { + w.Header().Set("Content-Type", "image/svg+xml") + } fmt.Fprintln(w, repohtml) log.Println("findFile() found internal file:", filename) // w.Close() @@ -112,6 +123,12 @@ func main() { readconfigfile() readVersionFile() + // make the instructions to install be: + // curl -sSL https://go.wit.com/install.sh | bash + + // build instruction: + // go install go.wit.com/apps/getgui@latest + // for i, s := range versionMap { // log.Println("found i =", i, "with", "s =", s) // } |
