diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-06-10 09:00:13 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2024-06-10 09:01:14 -0700 |
| commit | 5cc444c89968dda9060d4e2f458b1babb9b603cd (patch) | |
| tree | 3ee4a40710a18996d3673ac5f260df7c5ccd1a12 /hotline/transfer.go | |
| parent | c29db3dbd0491119755db5d99443dac423b2681b (diff) | |
Read banner once at startup
Diffstat (limited to 'hotline/transfer.go')
| -rw-r--r-- | hotline/transfer.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/hotline/transfer.go b/hotline/transfer.go index 543b00c..1257f8a 100644 --- a/hotline/transfer.go +++ b/hotline/transfer.go @@ -5,8 +5,6 @@ import ( "encoding/binary" "errors" "io" - "os" - "path/filepath" ) type transfer struct { @@ -57,14 +55,3 @@ func receiveFile(r io.Reader, targetFile, resForkFile, infoFork, counterWriter i } return nil } - -// TODO: read the banner once on startup instead of once per banner fetch -func (s *Server) bannerDownload(w io.Writer) error { - bannerBytes, err := os.ReadFile(filepath.Join(s.ConfigDir, s.Config.BannerFile)) - if err != nil { - return err - } - _, err = w.Write(bannerBytes) - - return err -} |