repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
e963190
parent
ee37580
author
Eric Bower
date
2026-02-22 07:39:09 -0500 EST
chore(pssh): add error/print helper cmds
2 files changed,  +17, -1
M pkg/apps/feeds/cron.go
+1, -1
1@@ -600,7 +600,7 @@ func (f *Fetcher) SendEmail(logger *slog.Logger, username, email, subject, unsub
2 	}
3 	var content strings.Builder
4 	for k, v := range headers {
5-		content.WriteString(fmt.Sprintf("%s: %s\r\n", k, v))
6+		fmt.Fprintf(&content, "%s: %s\r\n", k, v)
7 	}
8 	content.WriteString("\r\n")
9 	content.WriteString("\r\n--boundary123\r\n")
M pkg/pssh/server.go
+16, -0
 1@@ -151,6 +151,22 @@ func (s *SSHServerConnSession) Exit(code int) error {
 2 	return err
 3 }
 4 
 5+func (s *SSHServerConnSession) Errorf(sesh *SSHServerConnSession, f string, v ...interface{}) {
 6+	_, _ = fmt.Fprintf(sesh.Stderr(), f, v...)
 7+}
 8+
 9+func (s *SSHServerConnSession) Errorln(sesh *SSHServerConnSession, v ...interface{}) {
10+	_, _ = fmt.Fprintln(sesh.Stderr(), v...)
11+}
12+
13+func (s *SSHServerConnSession) Printf(sesh *SSHServerConnSession, f string, v ...interface{}) {
14+	_, _ = fmt.Fprintf(sesh, f, v...)
15+}
16+
17+func (s *SSHServerConnSession) Println(sesh *SSHServerConnSession, v ...interface{}) {
18+	_, _ = fmt.Fprintln(sesh, v...)
19+}
20+
21 func (s *SSHServerConnSession) Fatal(err error) {
22 	_, _ = fmt.Fprintln(s.Stderr(), err)
23 	_, _ = fmt.Fprintf(s.Stderr(), "\r")