Commit 6f3f3ce

Eric Bower  ·  2026-10-01 21:48:53 -0400 EDT
parent e72e6aa
chore: remove dead code
19 files changed,  +14, -475
+0, -75
......@@ -6,13 +6,11 @@ import (
66 "crypto/rand"
77 "encoding/pem"
88 "fmt"
9- "io"
109 "log/slog"
1110 "net"
1211 "os"
1312 "os/exec"
1413 "path/filepath"
15- "strings"
1614 "testing"
1715 "time"
1816
......@@ -408,26 +406,6 @@ type UserSSH struct {
408406 privateKey []byte
409407 }
410408
411-func NewUserSSH(username string, signer ssh.Signer) *UserSSH {
412- return &UserSSH{
413- username: username,
414- signer: signer,
415- }
416-}
417-
418-func (s UserSSH) Public() string {
419- pubkey := s.signer.PublicKey()
420- return string(ssh.MarshalAuthorizedKey(pubkey))
421-}
422-
423-func (s UserSSH) MustCmd(client *ssh.Client, patch []byte, cmd string) string {
424- res, err := s.Cmd(client, patch, cmd)
425- if err != nil {
426- panic(err)
427- }
428- return res
429-}
430-
431409 func (s UserSSH) NewClientAddr(addr string) (*ssh.Client, error) {
432410 config := &ssh.ClientConfig{
433411 User: s.username,
......@@ -441,59 +419,6 @@ func (s UserSSH) NewClientAddr(addr string) (*ssh.Client, error) {
441419 return client, err
442420 }
443421
444-func (s UserSSH) NewClient() (*ssh.Client, error) {
445- // Default to localhost:2222 for backward compatibility
446- return s.NewClientAddr("localhost:2222")
447-}
448-
449-func (s UserSSH) Cmd(client *ssh.Client, patch []byte, cmd string) (string, error) {
450- session, err := client.NewSession()
451- if err != nil {
452- return "", err
453- }
454- defer func() {
455- _ = session.Close()
456- }()
457-
458- stdinPipe, err := session.StdinPipe()
459- if err != nil {
460- return "", err
461- }
462-
463- stdoutPipe, err := session.StdoutPipe()
464- if err != nil {
465- return "", err
466- }
467-
468- if err := session.Start(cmd); err != nil {
469- return "", err
470- }
471-
472- if patch != nil {
473- _, err = stdinPipe.Write(patch)
474- if err != nil {
475- return "", err
476- }
477- }
478-
479- err = stdinPipe.Close()
480- if err != nil {
481- return "", err
482- }
483-
484- if err := session.Wait(); err != nil {
485- return "", err
486- }
487-
488- buf := new(strings.Builder)
489- _, err = io.Copy(buf, stdoutPipe)
490- if err != nil {
491- return "", err
492- }
493-
494- return buf.String(), nil
495-}
496-
497422 func GenerateUser() UserSSH {
498423 _, userKey, err := ed25519.GenerateKey(rand.Reader)
499424 if err != nil {
+0, -14
......@@ -1,14 +0,0 @@
1-package db
2-
3-import "strings"
4-
5-func FilterMetaFiles(posts []*Post) []*Post {
6- filtered := []*Post{}
7- for _, post := range posts {
8- if strings.HasPrefix(post.Filename, "_") {
9- continue
10- }
11- filtered = append(filtered, post)
12- }
13- return filtered
14-}
+0, -4
......@@ -60,10 +60,6 @@ func (tc *TestContext) DoWithHeaders(req *http.Request, headers map[string][]str
6060 return http.DefaultClient.Do(reqCopy)
6161 }
6262
63-func (tc *TestContext) GetHeader(resp *http.Response, key string) string {
64- return resp.Header.Get(key)
65-}
66-
6763 func testCacheValue(afterCreated time.Duration) *CacheValue {
6864 return &CacheValue{
6965 Header: map[string][]string{},
+0, -12
......@@ -563,18 +563,6 @@ type UserSSH struct {
563563 signer ssh.Signer
564564 }
565565
566-func NewUserSSH(username string, signer ssh.Signer) *UserSSH {
567- return &UserSSH{
568- username: username,
569- signer: signer,
570- }
571-}
572-
573-func (s UserSSH) Public() string {
574- pubkey := s.signer.PublicKey()
575- return string(ssh.MarshalAuthorizedKey(pubkey))
576-}
577-
578566 func (s UserSSH) CmdAddr(patch []byte, addr string, cmd string) (string, error) {
579567 config := &ssh.ClientConfig{
580568 User: s.username,
+14, -32
......@@ -127,7 +127,6 @@ type Options struct {
127127 // not directly referenced in the table, but used in the special case code.
128128 do_compression int
129129 info [COUNT_INFO]uint16
130- local_server int
131130
132131 // order matches long_options order
133132 verbose int
......@@ -355,37 +354,20 @@ func (o *Options) setOutputVerbosity(prio priority) {
355354 }
356355 }
357356
358-func (o *Options) Help() string {
359- return ""
360-}
361-
362-func (o *Options) ShellCommand() string { return o.shell_cmd }
363-func (o *Options) UpdateOnly() bool { return o.update_only != 0 }
364-func (o *Options) DryRun() bool { return o.dry_run != 0 }
365-func (o *Options) PreserveLinks() bool { return o.preserve_links != 0 }
366-func (o *Options) PreserveUid() bool { return o.preserve_uid != 0 }
367-func (o *Options) PreserveGid() bool { return o.preserve_gid != 0 }
368-func (o *Options) PreserveDevices() bool { return o.preserve_devices != 0 }
369-func (o *Options) PreserveMTimes() bool { return o.preserve_mtimes != 0 }
370-func (o *Options) PreservePerms() bool { return o.preserve_perms != 0 }
371-func (o *Options) PreserveSpecials() bool { return o.preserve_specials != 0 }
372-func (o *Options) PreserveHardLinks() bool { return o.preserve_hard_links != 0 }
373-func (o *Options) Recurse() bool { return o.recurse != 0 }
374-func (o *Options) Verbose() bool { return o.verbose != 0 }
375-func (o *Options) DeleteMode() bool { return o.delete_mode != 0 }
376-func (o *Options) Sender() bool { return o.am_sender != 0 }
377-func (o *Options) SetSender() { o.am_sender = 1 }
378-func (o *Options) LocalServer() bool { return o.local_server != 0 }
379-func (o *Options) SetLocalServer() { o.local_server = 1 }
380-func (o *Options) Server() bool { return o.am_server != 0 }
381-func (o *Options) Daemon() bool { return o.am_daemon != 0 }
382-func (o *Options) ConnectTimeoutSeconds() int { return o.connect_timeout }
383-func (o *Options) AlwaysChecksum() bool { return o.always_checksum != 0 }
384-func (o *Options) Compress() bool { return o.do_compression != 0 }
385-func (o *Options) CompressChoice() string { return o.compress_choice }
386-func (o *Options) CompressLevel() int { return o.do_compression_level }
387-func (o *Options) IgnoreTimes() bool { return o.ignore_times == 1 }
388-func (o *Options) SizeOnly() bool { return o.size_only == 1 }
357+func (o *Options) DryRun() bool { return o.dry_run != 0 }
358+func (o *Options) PreserveLinks() bool { return o.preserve_links != 0 }
359+func (o *Options) PreserveUid() bool { return o.preserve_uid != 0 }
360+func (o *Options) PreserveGid() bool { return o.preserve_gid != 0 }
361+func (o *Options) PreserveDevices() bool { return o.preserve_devices != 0 }
362+func (o *Options) PreserveMTimes() bool { return o.preserve_mtimes != 0 }
363+func (o *Options) PreservePerms() bool { return o.preserve_perms != 0 }
364+func (o *Options) PreserveSpecials() bool { return o.preserve_specials != 0 }
365+func (o *Options) Recurse() bool { return o.recurse != 0 }
366+func (o *Options) DeleteMode() bool { return o.delete_mode != 0 }
367+func (o *Options) AlwaysChecksum() bool { return o.always_checksum != 0 }
368+func (o *Options) Compress() bool { return o.do_compression != 0 }
369+func (o *Options) IgnoreTimes() bool { return o.ignore_times == 1 }
370+func (o *Options) SizeOnly() bool { return o.size_only == 1 }
389371
390372 func (o *Options) daemonTable() []poptOption {
391373 return []poptOption{
+0, -55
......@@ -3,9 +3,7 @@ package rsyncwire
33 import (
44 "bytes"
55 "encoding/binary"
6- "fmt"
76 "io"
8- "log/slog"
97 )
108
119 const (
......@@ -34,59 +32,6 @@ func (w *MultiplexWriter) WriteMsg(tag uint8, p []byte) (n int, err error) {
3432 return w.Writer.Write(p)
3533 }
3634
37-type MultiplexReader struct {
38- Reader io.Reader
39-}
40-
41-// rsync.h defines IO_BUFFER_SIZE as 32 * 1024, but gokr-rsyncd increases it to
42-// 256K. Since we use this as the maximum message size, too, we need to at least
43-// match it.
44-const ioBufferSize = 256 * 1024
45-const maxMessageSize = ioBufferSize
46-
47-func (w *MultiplexReader) ReadMsg() (tag uint8, p []byte, err error) {
48- var header uint32
49- if err := binary.Read(w.Reader, binary.LittleEndian, &header); err != nil {
50- return 0, nil, err
51- }
52-
53- tag = uint8(header>>24) - mplexBase
54- length := header & 0x00FFFFFF
55- if length > maxMessageSize {
56- // NOTE: if you run into this error, one alternative to bumping
57- // maxMessageSize is to restructure the program to work with i/o buffer
58- // windowing.
59- return 0, nil, fmt.Errorf("length %d exceeds max message size (%d)", length, maxMessageSize)
60- }
61- p = make([]byte, int(length))
62- if _, err := io.ReadFull(w.Reader, p); err != nil {
63- return 0, nil, err
64- }
65- // log.Printf("header=%v (%x), tag=%v, length=%v", header, header, tag, length)
66- // log.Printf("payload=%x / %q", p, p)
67- return tag, p, nil
68-}
69-
70-func (w *MultiplexReader) Read(p []byte) (n int, err error) {
71- tag, payload, err := w.ReadMsg()
72- if err != nil {
73- return 0, err
74- }
75- if tag == MsgError {
76- return 0, fmt.Errorf("%s", payload)
77- }
78- if tag == MsgInfo {
79- slog.Debug("info", "payload", payload)
80- }
81- if tag != MsgData {
82- return 0, fmt.Errorf("unexpected tag: got %v, want %v", tag, MsgData)
83- }
84- if len(p) < len(payload) {
85- panic(fmt.Sprintf("not enough buffer space! %d < %d", len(p), len(payload)))
86- }
87- return copy(p, payload), nil
88-}
89-
9035 type Buffer struct {
9136 // buf.Write() never fails, making for a convenient API.
9237 buf bytes.Buffer
+0, -8
......@@ -57,11 +57,3 @@ func SortFileList(fileList []*ReceiverFile) {
5757 return fileList[i].Name < fileList[j].Name
5858 })
5959 }
60-
61-// rsync/receiver.c:delete_files.
62-func FindInFileList(fileList []*ReceiverFile, name string) bool {
63- i := sort.Search(len(fileList), func(i int) bool {
64- return fileList[i].Name >= name
65- })
66- return i < len(fileList) && fileList[i].Name == name
67-}
+0, -4
......@@ -9,10 +9,6 @@ import (
99 "github.com/picosh/pico/pkg/send/utils"
1010 )
1111
12-func GetImgsBucketName(userID string) string {
13- return userID
14-}
15-
1612 func GetAssetBucketName(userID string) string {
1713 return fmt.Sprintf("static-%s", userID)
1814 }
+0, -25
......@@ -1,34 +1,9 @@
11 package shared
22
33 import (
4- "fmt"
54 "io"
6- "log/slog"
7- "os"
85 )
96
10-type CmdSessionLogger struct {
11- Log *slog.Logger
12-}
13-
14-func (c *CmdSessionLogger) Write(out []byte) (int, error) {
15- c.Log.Info(string(out))
16- return 0, nil
17-}
18-
19-func (c *CmdSessionLogger) Exit(code int) error {
20- os.Exit(code)
21- return fmt.Errorf("panic %d", code)
22-}
23-
24-func (c *CmdSessionLogger) Close() error {
25- return fmt.Errorf("closing")
26-}
27-
28-func (c *CmdSessionLogger) Stderr() io.ReadWriter {
29- return nil
30-}
31-
327 type CmdSession interface {
338 Write([]byte) (int, error)
349 Exit(code int) error
+0, -90
......@@ -1,23 +1,16 @@
11 package router
22
33 import (
4- "context"
54 "crypto/hmac"
65 "crypto/sha256"
76 "encoding/hex"
8- "encoding/json"
97 "errors"
108 "fmt"
11- "log/slog"
129 "net"
13- "net/http"
1410 "net/url"
1511 "strings"
16- "time"
1712
1813 "github.com/picosh/pico/pkg/db"
19- "github.com/picosh/pico/pkg/shared"
20- "github.com/picosh/utils/pipe/metrics"
2114 "github.com/simplesurance/go-ip-anonymizer/ipanonymizer"
2215 "github.com/x-way/crawlerdetect"
2316 )
......@@ -51,11 +44,6 @@ func trackableUserAgent(agent string) error {
5144 return nil
5245 }
5346
54-func trackableRequest(r *http.Request) error {
55- agent := r.UserAgent()
56- return trackableUserAgent(agent)
57-}
58-
5947 func cleanIpAddress(ip string) (string, error) {
6048 host, _, err := net.SplitHostPort(ip)
6149 if err != nil {
......@@ -79,18 +67,6 @@ func cleanUrl(orig string) (string, string) {
7967 return u.Host, u.Path
8068 }
8169
82-func cleanUrlFromRequest(r *http.Request) (string, string) {
83- host := r.Header.Get("x-forwarded-host")
84- if host == "" {
85- host = r.URL.Host
86- }
87- if host == "" {
88- host = r.Host
89- }
90- // we don't want query params in the url for security reasons
91- return host, r.URL.Path
92-}
93-
9470 func CleanUserAgent(ua string) string {
9571 // truncate user-agent because http headers have no text limit
9672 if len(ua) > 1000 {
......@@ -193,69 +169,3 @@ func AnalyticsVisitFromVisit(visit *db.AnalyticsVisits, dbpool db.DB, secret str
193169
194170 return nil
195171 }
196-
197-func ipFromRequest(r *http.Request) string {
198- // https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults
199- ipOrig := r.Header.Get("x-forwarded-for")
200- if ipOrig == "" {
201- ipOrig = r.RemoteAddr
202- }
203- // probably means this is a web tunnel
204- if ipOrig == "" || ipOrig == "@" {
205- sshCtx, err := GetSshCtx(r)
206- if err == nil {
207- ipOrig = sshCtx.RemoteAddr().String()
208- }
209- }
210-
211- return ipOrig
212-}
213-
214-func AnalyticsVisitFromRequest(r *http.Request, dbpool db.DB, userID string) (*db.AnalyticsVisits, error) {
215- if !dbpool.HasFeatureByUser(userID, "analytics") {
216- return nil, ErrAnalyticsDisabled
217- }
218-
219- err := trackableRequest(r)
220- if err != nil {
221- return nil, err
222- }
223-
224- ipAddress := ipFromRequest(r)
225- host, path := cleanUrlFromRequest(r)
226-
227- return &db.AnalyticsVisits{
228- UserID: userID,
229- Host: host,
230- Path: path,
231- IpAddress: ipAddress,
232- UserAgent: r.UserAgent(),
233- Referer: r.Referer(),
234- Status: http.StatusOK,
235- }, nil
236-}
237-
238-func AnalyticsCollect(ch chan *db.AnalyticsVisits, dbpool db.DB, logger *slog.Logger) {
239- drain := metrics.RegisterReconnectMetricRecorder(
240- context.Background(),
241- logger,
242- shared.NewPicoPipeClient(),
243- 100,
244- 10*time.Millisecond,
245- )
246-
247- for visit := range ch {
248- data, err := json.Marshal(visit)
249- if err != nil {
250- logger.Error("could not json marshall visit record", "err", err)
251- continue
252- }
253-
254- data = append(data, '\n')
255-
256- _, err = drain.Write(data)
257- if err != nil {
258- logger.Error("could not write to metric-drain", "err", err)
259- }
260- }
261-}
+0, -25
......@@ -1,16 +1,13 @@
11 package router
22
33 import (
4- "encoding/json"
54 "fmt"
65 "html/template"
76 "net/http"
87 "os"
98 "strings"
109
11- "github.com/picosh/pico/pkg/db"
1210 "github.com/picosh/pico/pkg/shared"
13- "golang.org/x/crypto/ssh"
1411 )
1512
1613 type SubdomainProps struct {
......@@ -43,28 +40,6 @@ func UnauthorizedHandler(w http.ResponseWriter, r *http.Request) {
4340 http.Error(w, "You do not have access to this site", http.StatusUnauthorized)
4441 }
4542
46-type errPayload struct {
47- Message string `json:"message"`
48-}
49-
50-func JSONError(w http.ResponseWriter, msg string, code int) {
51- w.Header().Set("Content-Type", "application/json")
52- w.WriteHeader(code)
53- _ = json.NewEncoder(w).Encode(errPayload{Message: msg})
54-}
55-
56-type UserApi struct {
57- *db.User
58- Fingerprint string `json:"fingerprint"`
59-}
60-
61-func NewUserApi(user *db.User, pubkey ssh.PublicKey) *UserApi {
62- return &UserApi{
63- User: user,
64- Fingerprint: shared.KeyForSha256(pubkey),
65- }
66-}
67-
6843 func CheckHandler(w http.ResponseWriter, r *http.Request) {
6944 dbpool := GetDB(r)
7045 cfg := GetCfg(r)
+0, -19
......@@ -12,7 +12,6 @@ import (
1212
1313 "github.com/hashicorp/golang-lru/v2/expirable"
1414 "github.com/picosh/pico/pkg/db"
15- "github.com/picosh/pico/pkg/pssh"
1615 "github.com/picosh/pico/pkg/shared"
1716 "github.com/picosh/pico/pkg/storage"
1817 )
......@@ -33,15 +32,6 @@ func NewRoute(method, pattern string, handler http.HandlerFunc) Route {
3332 }
3433 }
3534
36-func NewCorsRoute(method, pattern string, handler http.HandlerFunc) Route {
37- return Route{
38- method,
39- regexp.MustCompile("^" + pattern + "$"),
40- handler,
41- true,
42- }
43-}
44-
4535 func CreatePProfRoutes(routes []Route) []Route {
4636 return append(routes,
4737 NewRoute("GET", "/debug/pprof/cmdline", pprof.Cmdline),
......@@ -175,15 +165,6 @@ type ctxCfg struct{}
175165
176166 type CtxSubdomainKey struct{}
177167 type ctxKey struct{}
178-type CtxSessionKey struct{}
179-
180-func GetSshCtx(r *http.Request) (*pssh.SSHServerConnSession, error) {
181- payload, ok := r.Context().Value(CtxSessionKey{}).(*pssh.SSHServerConnSession)
182- if payload == nil || !ok {
183- return payload, fmt.Errorf("ssh session not set on `r.Context()` for connection")
184- }
185- return payload, nil
186-}
187168
188169 func GetCfg(r *http.Request) *shared.ConfigSite {
189170 return r.Context().Value(ctxCfg{}).(*shared.ConfigSite)
+0, -4
......@@ -58,10 +58,6 @@ func KeyForKeyText(pk ssh.PublicKey) string {
5858 return fmt.Sprintf("%s %s", pk.Type(), kb)
5959 }
6060
61-func KeyForSha256(pk ssh.PublicKey) string {
62- return ssh.FingerprintSHA256(pk)
63-}
64-
6561 func GetEnv(key string, defaultVal string) string {
6662 if value, exists := os.LookupEnv(key); exists {
6763 return value
+0, -45
......@@ -1,45 +0,0 @@
1-package storage
2-
3-import (
4- "fmt"
5-
6- "github.com/picosh/pico/pkg/pssh"
7- "github.com/picosh/pico/pkg/send/utils"
8-)
9-
10-type AssetNames interface {
11- BucketName(sesh *pssh.SSHServerConnSession) (string, error)
12- ObjectName(sesh *pssh.SSHServerConnSession, entry *utils.FileEntry) (string, error)
13- PrintObjectName(sesh *pssh.SSHServerConnSession, entry *utils.FileEntry, bucketName string) (string, error)
14-}
15-
16-type AssetNamesBasic struct{}
17-
18-var _ AssetNames = &AssetNamesBasic{}
19-var _ AssetNames = (*AssetNamesBasic)(nil)
20-
21-func (an *AssetNamesBasic) BucketName(sesh *pssh.SSHServerConnSession) (string, error) {
22- return sesh.User(), nil
23-}
24-func (an *AssetNamesBasic) ObjectName(sesh *pssh.SSHServerConnSession, entry *utils.FileEntry) (string, error) {
25- return entry.Filepath, nil
26-}
27-func (an *AssetNamesBasic) PrintObjectName(sesh *pssh.SSHServerConnSession, entry *utils.FileEntry, bucketName string) (string, error) {
28- objectName, err := an.ObjectName(sesh, entry)
29- if err != nil {
30- return "", err
31- }
32- return fmt.Sprintf("%s%s", bucketName, objectName), nil
33-}
34-
35-type AssetNamesForceBucket struct {
36- *AssetNamesBasic
37- Name string
38-}
39-
40-var _ AssetNames = &AssetNamesForceBucket{}
41-var _ AssetNames = (*AssetNamesForceBucket)(nil)
42-
43-func (an *AssetNamesForceBucket) BucketName(sesh *pssh.SSHServerConnSession) (string, error) {
44- return an.Name, nil
45-}
+0, -34
......@@ -1,34 +0,0 @@
1-package storage
2-
3-import (
4- "errors"
5- "io"
6-
7- "github.com/picosh/pico/pkg/send/utils"
8-)
9-
10-type AllReaderAt struct {
11- Reader utils.ReadAndReaderAtCloser
12-}
13-
14-func NewAllReaderAt(reader utils.ReadAndReaderAtCloser) *AllReaderAt {
15- return &AllReaderAt{reader}
16-}
17-
18-func (a *AllReaderAt) ReadAt(p []byte, off int64) (n int, err error) {
19- n, err = a.Reader.ReadAt(p, off)
20-
21- if errors.Is(err, io.EOF) {
22- return
23- }
24-
25- return
26-}
27-
28-func (a *AllReaderAt) Read(p []byte) (int, error) {
29- return a.Reader.Read(p)
30-}
31-
32-func (a *AllReaderAt) Close() error {
33- return a.Reader.Close()
34-}
+0, -12
......@@ -18,10 +18,6 @@ func NewUsageInfo(label string, stats *db.UserServiceStats) *UsageInfo {
1818 return &UsageInfo{Label: label, stats: stats}
1919 }
2020
21-func (m *UsageInfo) HandleEvent(ev vaxis.Event, phase vxfw.EventPhase) (vxfw.Command, error) {
22- return nil, nil
23-}
24-
2521 func (m *UsageInfo) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
2622 info := NewKv(m.getKv())
2723 brd := NewBorder(info)
......@@ -57,10 +53,6 @@ func NewUserInfo(shrd *SharedModel) *UserInfo {
5753 return &UserInfo{shrd}
5854 }
5955
60-func (m *UserInfo) HandleEvent(ev vaxis.Event, phase vxfw.EventPhase) (vxfw.Command, error) {
61- return nil, nil
62-}
63-
6456 func (m *UserInfo) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
6557 features := NewKv(m.getKv())
6658 brd := NewBorder(features)
......@@ -170,10 +162,6 @@ func NewServicesList(plusFf *db.FeatureFlag, pgsFf *db.FeatureFlag, proseFf *db.
170162 return &ServicesList{plusFf: plusFf, pgsFf: pgsFf, proseFf: proseFf}
171163 }
172164
173-func (m *ServicesList) HandleEvent(ev vaxis.Event, phase vxfw.EventPhase) (vxfw.Command, error) {
174- return nil, nil
175-}
176-
177165 func (m *ServicesList) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
178166 services := NewKv(m.getServiceKv())
179167 brd := NewBorder(services)
+0, -6
......@@ -1,8 +1,6 @@
11 package tui
22
33 import (
4- "io"
5-
64 "github.com/picosh/pico/pkg/shared"
75 )
86
......@@ -23,7 +21,3 @@ func (m *SenpaiCmd) Run() error {
2321 app.Close()
2422 return nil
2523 }
26-
27-func (m *SenpaiCmd) SetStdin(io.Reader) {}
28-func (m *SenpaiCmd) SetStdout(io.Writer) {}
29-func (m *SenpaiCmd) SetStderr(io.Writer) {}
+0, -4
......@@ -247,10 +247,6 @@ func NewFooterWdt(shrd *SharedModel, cmds []Shortcut) *FooterWdgt {
247247 }
248248 }
249249
250-func (m *FooterWdgt) HandleEvent(ev vaxis.Event, phase vxfw.EventPhase) (vxfw.Command, error) {
251- return nil, nil
252-}
253-
254250 func (m *FooterWdgt) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
255251 segs := []vaxis.Segment{}
256252 for idx, shortcut := range m.cmds {
+0, -7
......@@ -27,13 +27,6 @@ type WebTunnelHandler struct {
2727 Logger *slog.Logger
2828 }
2929
30-func NewWebTunnelHandler(handler HttpHandlerFn, logger *slog.Logger) *WebTunnelHandler {
31- return &WebTunnelHandler{
32- HttpHandler: handler,
33- Logger: logger,
34- }
35-}
36-
3730 func (wt *WebTunnelHandler) GetLogger() *slog.Logger {
3831 return wt.Logger
3932 }