summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/cgi/main.go6
-rw-r--r--examples/cowsay/main.go8
-rw-r--r--examples/fetch/main.go6
-rw-r--r--examples/fileserver/main.go10
-rw-r--r--examples/finger/main.go4
-rw-r--r--examples/gmi2html/main.go4
-rw-r--r--examples/gmi2md/main.go4
-rw-r--r--examples/gopher_fileserver/main.go12
-rw-r--r--examples/inspectls/main.go8
9 files changed, 31 insertions, 31 deletions
diff --git a/examples/cgi/main.go b/examples/cgi/main.go
index 5c1b9a2..a582c9e 100644
--- a/examples/cgi/main.go
+++ b/examples/cgi/main.go
@@ -7,9 +7,9 @@ import (
"os/signal"
"syscall"
- "tildegit.org/tjp/gus/contrib/cgi"
- "tildegit.org/tjp/gus/gemini"
- "tildegit.org/tjp/gus/logging"
+ "tildegit.org/tjp/sliderule/contrib/cgi"
+ "tildegit.org/tjp/sliderule/gemini"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
diff --git a/examples/cowsay/main.go b/examples/cowsay/main.go
index 93f50d8..32ba2ea 100644
--- a/examples/cowsay/main.go
+++ b/examples/cowsay/main.go
@@ -8,9 +8,9 @@ import (
"os"
"os/exec"
- "tildegit.org/tjp/gus"
- "tildegit.org/tjp/gus/gemini"
- "tildegit.org/tjp/gus/logging"
+ sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/gemini"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
@@ -36,7 +36,7 @@ func main() {
server.Serve()
}
-var cowsayHandler = gus.HandlerFunc(func(ctx context.Context, req *gus.Request) *gus.Response {
+var cowsayHandler = sr.HandlerFunc(func(ctx context.Context, req *sr.Request) *sr.Response {
// prompt for a query if there is none already
if req.RawQuery == "" {
return gemini.Input("enter a phrase")
diff --git a/examples/fetch/main.go b/examples/fetch/main.go
index 109a042..fccc6cf 100644
--- a/examples/fetch/main.go
+++ b/examples/fetch/main.go
@@ -8,8 +8,8 @@ import (
"os"
"strings"
- "tildegit.org/tjp/gus"
- "tildegit.org/tjp/gus/gemini"
+ sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/gemini"
)
func main() {
@@ -30,7 +30,7 @@ func main() {
}
// parse the URL and build the request
- request := &gus.Request{URL: buildURL()}
+ request := &sr.Request{URL: buildURL()}
// fetch the response
response, err := client.RoundTrip(request)
diff --git a/examples/fileserver/main.go b/examples/fileserver/main.go
index be427a1..d38a450 100644
--- a/examples/fileserver/main.go
+++ b/examples/fileserver/main.go
@@ -5,10 +5,10 @@ import (
"log"
"os"
- "tildegit.org/tjp/gus"
- "tildegit.org/tjp/gus/contrib/fs"
- "tildegit.org/tjp/gus/gemini"
- "tildegit.org/tjp/gus/logging"
+ sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/contrib/fs"
+ "tildegit.org/tjp/sliderule/gemini"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
@@ -24,7 +24,7 @@ func main() {
// build the request handler
fileSystem := os.DirFS(".")
// Fallthrough tries each handler in succession until it gets something other than "51 Not Found"
- handler := gus.FallthroughHandler(
+ handler := sr.FallthroughHandler(
// first see if they're fetching a directory and we have <dir>/index.gmi
fs.GeminiDirectoryDefault(fileSystem, "index.gmi"),
// next (still if they requested a directory) build a directory listing response
diff --git a/examples/finger/main.go b/examples/finger/main.go
index 3000dd7..723e3e6 100644
--- a/examples/finger/main.go
+++ b/examples/finger/main.go
@@ -4,8 +4,8 @@ import (
"context"
"log"
- "tildegit.org/tjp/gus/finger"
- "tildegit.org/tjp/gus/logging"
+ "tildegit.org/tjp/sliderule/finger"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
diff --git a/examples/gmi2html/main.go b/examples/gmi2html/main.go
index 40c0b8c..b9a0353 100644
--- a/examples/gmi2html/main.go
+++ b/examples/gmi2html/main.go
@@ -4,8 +4,8 @@ import (
"log"
"os"
- "tildegit.org/tjp/gus/gemini/gemtext"
- "tildegit.org/tjp/gus/gemini/gemtext/htmlconv"
+ "tildegit.org/tjp/sliderule/gemini/gemtext"
+ "tildegit.org/tjp/sliderule/gemini/gemtext/htmlconv"
)
func main() {
diff --git a/examples/gmi2md/main.go b/examples/gmi2md/main.go
index df604ba..4a7a714 100644
--- a/examples/gmi2md/main.go
+++ b/examples/gmi2md/main.go
@@ -4,8 +4,8 @@ import (
"log"
"os"
- "tildegit.org/tjp/gus/gemini/gemtext"
- "tildegit.org/tjp/gus/gemini/gemtext/mdconv"
+ "tildegit.org/tjp/sliderule/gemini/gemtext"
+ "tildegit.org/tjp/sliderule/gemini/gemtext/mdconv"
)
func main() {
diff --git a/examples/gopher_fileserver/main.go b/examples/gopher_fileserver/main.go
index 172ca87..244f61b 100644
--- a/examples/gopher_fileserver/main.go
+++ b/examples/gopher_fileserver/main.go
@@ -5,17 +5,17 @@ import (
"log"
"os"
- "tildegit.org/tjp/gus"
- "tildegit.org/tjp/gus/contrib/cgi"
- "tildegit.org/tjp/gus/contrib/fs"
- "tildegit.org/tjp/gus/gopher"
- "tildegit.org/tjp/gus/logging"
+ sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/contrib/cgi"
+ "tildegit.org/tjp/sliderule/contrib/fs"
+ "tildegit.org/tjp/sliderule/gopher"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
fileSystem := os.DirFS(".")
- handler := gus.FallthroughHandler(
+ handler := sr.FallthroughHandler(
fs.GopherDirectoryDefault(fileSystem, "index.gophermap"),
fs.GopherDirectoryListing(fileSystem, nil),
cgi.GopherCGIDirectory("/cgi-bin", "./cgi-bin"),
diff --git a/examples/inspectls/main.go b/examples/inspectls/main.go
index 485b84e..5becb71 100644
--- a/examples/inspectls/main.go
+++ b/examples/inspectls/main.go
@@ -12,9 +12,9 @@ import (
"os"
"strings"
- "tildegit.org/tjp/gus"
- "tildegit.org/tjp/gus/gemini"
- "tildegit.org/tjp/gus/logging"
+ sr "tildegit.org/tjp/sliderule"
+ "tildegit.org/tjp/sliderule/gemini"
+ "tildegit.org/tjp/sliderule/logging"
)
func main() {
@@ -54,7 +54,7 @@ func envConfig() (string, string) {
return certfile, keyfile
}
-var inspectHandler = gus.HandlerFunc(func(ctx context.Context, req *gus.Request) *gus.Response {
+var inspectHandler = sr.HandlerFunc(func(ctx context.Context, req *sr.Request) *sr.Response {
// build and return a ```-wrapped description of the connection TLS state
body := "```\n" + displayTLSState(req.TLSState) + "\n```"
return gemini.Success("text/gemini", bytes.NewBufferString(body))