repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
288c1ad
parent
f63218d
author
Eric Bower
date
2024-09-05 02:14:16 +0000 UTC
chore: cleanup
3 files changed,  +12, -9
M pubsub/cli.go
+5, -8
 1@@ -103,6 +103,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
 2 			}
 3 
 4 			if len(args) == 0 {
 5+				opts.help()
 6 				next(sesh)
 7 				return
 8 			}
 9@@ -111,15 +112,12 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
10 			if len(args) == 1 {
11 				if cmd == "help" {
12 					opts.help()
13-					return
14 				} else if cmd == "ls" {
15 					err := opts.ls()
16 					opts.bail(err)
17-					return
18-				} else {
19-					next(sesh)
20-					return
21 				}
22+				next(sesh)
23+				return
24 			}
25 
26 			repoName := strings.TrimSpace(args[1])
27@@ -150,10 +148,9 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
28 				if err != nil {
29 					wish.Errorln(sesh, err)
30 				}
31-			} else {
32-				next(sesh)
33-				return
34 			}
35+
36+			next(sesh)
37 		}
38 	}
39 }
A pubsub/html/footer.partial.tmpl
+6, -0
1@@ -0,0 +1,6 @@
2+{{define "footer"}}
3+<footer>
4+    <hr />
5+    published with <a href={{.Site.HomeURL}}>{{.Site.Domain}}</a>
6+</footer>
7+{{end}}
M pubsub/ssh.go
+1, -1
 1@@ -44,8 +44,8 @@ func StartSshServer() {
 2 		wish.WithAddress(fmt.Sprintf("%s:%s", host, port)),
 3 		wish.WithHostKeyPath("ssh_data/term_info_ed25519"),
 4 		wish.WithPublicKeyAuth(sshAuth.PubkeyAuthHandler),
 5-		wish.WithMiddleware(WishMiddleware(handler)),
 6 		wish.WithMiddleware(
 7+			WishMiddleware(handler),
 8 			promwish.Middleware(fmt.Sprintf("%s:%s", host, promPort), "pubsub-ssh"),
 9 			wsh.LogMiddleware(logger),
10 		),