diff --git a/files/goReference.svg b/files/goReference.svg new file mode 100644 index 0000000..99e2d73 --- /dev/null +++ b/files/goReference.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/files/install.sh b/files/install.sh new file mode 100755 index 0000000..88642a5 --- /dev/null +++ b/files/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash -x +# + +echo "TODO: make this work" diff --git a/files/repomap b/files/repomap index 5088471..febb074 100644 --- a/files/repomap +++ b/files/repomap @@ -10,11 +10,13 @@ go.wit.com/apps/basicwindow git.wit.org/jcarr/basicwindow A bit more of a Demo go.wit.com/apps/gadgetwindow git.wit.org/jcarr/gadgetwindow A more complicated Demo used for debugging the toolkits go.wit.com/apps/autotypist git.wit.org/jcarr/autotypist Wrapper around 'git' and 'go' for these repos go.wit.com/apps/guireleaser git.wit.org/jcarr/guireleaser +go.wit.com/apps/go-deb git.wit.org/jcarr/go-deb Turn a GO package into a .deb package go.wit.com/apps/control-panel-digitalocean git.wit.org/wit/control-panel-digitalocean A simple Digital Ocean Control Panel go.wit.com/apps/control-panel-dns git.wit.org/jcarr/control-panel-dns A DNS Control Panel go.wit.com/apps/control-panel-cloudflare git.wit.org/wit/control-panel-cloudflare go.wit.com/apps/control-panel-vpn git.wit.org/jcarr/control-panel-vpn go.wit.com/apps/go.wit.com git.wit.org/jcarr/go.wit.com +go.wit.com/apps/clone-gitea git.wit.org/jcarr/clone-gitea # gui toolkit packages go.wit.com/toolkits/tree git.wit.org/toolkits/tree Common plugin code to talk to the GUI diff --git a/main.go b/main.go index e3c42b7..db00f9d 100644 --- a/main.go +++ b/main.go @@ -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) // }