Commit 10bb33f8 authored by Hector Sanjuan's avatar Hector Sanjuan

Golint: improve comments in merkledag/errservice.go

Per @kevina's comments

License: MIT
Signed-off-by: default avatarHector Sanjuan <hector@protocol.ai>
parent a7fc136a
...@@ -14,34 +14,34 @@ type ErrorService struct { ...@@ -14,34 +14,34 @@ type ErrorService struct {
var _ ipld.DAGService = (*ErrorService)(nil) var _ ipld.DAGService = (*ErrorService)(nil)
// Add returns an error. // Add returns the cs.Err.
func (cs *ErrorService) Add(ctx context.Context, nd ipld.Node) error { func (cs *ErrorService) Add(ctx context.Context, nd ipld.Node) error {
return cs.Err return cs.Err
} }
// AddMany returns an error. // AddMany returns the cs.Err.
func (cs *ErrorService) AddMany(ctx context.Context, nds []ipld.Node) error { func (cs *ErrorService) AddMany(ctx context.Context, nds []ipld.Node) error {
return cs.Err return cs.Err
} }
// Get returns an error. // Get returns the cs.Err.
func (cs *ErrorService) Get(ctx context.Context, c *cid.Cid) (ipld.Node, error) { func (cs *ErrorService) Get(ctx context.Context, c *cid.Cid) (ipld.Node, error) {
return nil, cs.Err return nil, cs.Err
} }
// GetMany many returns an error. // GetMany many returns the cs.Err.
func (cs *ErrorService) GetMany(ctx context.Context, cids []*cid.Cid) <-chan *ipld.NodeOption { func (cs *ErrorService) GetMany(ctx context.Context, cids []*cid.Cid) <-chan *ipld.NodeOption {
ch := make(chan *ipld.NodeOption) ch := make(chan *ipld.NodeOption)
close(ch) close(ch)
return ch return ch
} }
// Remove returns an error. // Remove returns the cs.Err.
func (cs *ErrorService) Remove(ctx context.Context, c *cid.Cid) error { func (cs *ErrorService) Remove(ctx context.Context, c *cid.Cid) error {
return cs.Err return cs.Err
} }
// RemoveMany returns an error. // RemoveMany returns the cs.Err.
func (cs *ErrorService) RemoveMany(ctx context.Context, cids []*cid.Cid) error { func (cs *ErrorService) RemoveMany(ctx context.Context, cids []*cid.Cid) error {
return cs.Err return cs.Err
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment