fix formatting in persistence/stdout.go
This commit is contained in:
parent
f2edd2499a
commit
c310d993bb
@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
type out struct {
|
type out struct {
|
||||||
InfoHash []byte `json:"infoHash"`
|
InfoHash []byte `json:"infoHash"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Files []File `json:"files"`
|
Files []File `json:"files"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var notSupportedError = errors.New("This dummy database engine (\"stdout\") does not support any sort of queries")
|
var notSupportedError = errors.New("This dummy database engine (\"stdout\") does not support any sort of queries")
|
||||||
@ -40,10 +40,10 @@ func (s *stdout) DoesTorrentExist(infoHash []byte) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *stdout) AddNewTorrent(infoHash []byte, name string, files []File) error {
|
func (s *stdout) AddNewTorrent(infoHash []byte, name string, files []File) error {
|
||||||
err := s.encoder.Encode(out {
|
err := s.encoder.Encode(out{
|
||||||
InfoHash: infoHash,
|
InfoHash: infoHash,
|
||||||
Name: name,
|
Name: name,
|
||||||
Files: files,
|
Files: files,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "DB engine stdout encode error")
|
return errors.Wrap(err, "DB engine stdout encode error")
|
||||||
|
Loading…
Reference in New Issue
Block a user