swarm, cmd: gofmt updates"

This commit is contained in:
Kiel barry 2018-06-07 17:43:27 -07:00
parent 2158dbc10a
commit e802c8a383
6 changed files with 10 additions and 11 deletions

View file

@ -25,9 +25,9 @@ import (
const (
SwarmfsVersion = "0.1"
mountTimeout = time.Second * 5
unmountTimeout = time.Second * 10
maxFuseMounts = 5
mountTimeout = time.Second * 5
unmountTimeout = time.Second * 10
maxFuseMounts = 5
)
var (
@ -56,7 +56,7 @@ func NewSwarmFS(api *api.API) *SwarmFS {
}
// NewInode increments the Inode, which needs to be unique.
// NewInode increments the Inode, which needs to be unique.
// They are used for caching inside fuse
func NewInode() uint64 {
inodeLock.Lock()

View file

@ -83,8 +83,8 @@ func (d *Depo) HandleUnsyncedKeysMsg(req *unsyncedKeysMsgData, p *peer) error {
}
// HandleDeliveryRequestMsg 1) serves actual chunks asked by the remote peer
// by pushing to the delivery queue (sync db) of the correct priority
// (remote peer is free to reprioritize), 2) the message implies remote peer
// by pushing to the delivery queue (sync db) of the correct priority
// (remote peer is free to reprioritize), 2) the message implies remote peer
// wants more, so trigger for 3) new outgoing unsynced keys message is fired.
func (d *Depo) HandleDeliveryRequestMsg(req *deliveryRequestMsgData, p *peer) error {
deliver := req.Deliver

View file

@ -223,7 +223,6 @@ func (h *Hive) keepAlive() {
}
}
func (h *Hive) Stop() error {
// closing toggle channel quits the updateloop
close(h.quit)

View file

@ -93,7 +93,7 @@ type Node interface {
Drop()
}
// New is a public constructor. Addr is the base address of the table
// New is a public constructor. Addr is the base address of the table
// and params is KadParams configuration.
func New(addr Address, params *KadParams) *Kademlia {
buckets := make([][]Node, params.MaxProx+1)

View file

@ -66,7 +66,7 @@ type syncState struct {
synced chan bool // signal that sync stage finished
}
// DbAccess is the wrapper of db-s to provide mockable custom
// DbAccess is the wrapper of db-s to provide mockable custom
// local chunk store access to syncer.
type DbAccess struct {
db *storage.DbStore

View file

@ -59,7 +59,7 @@ type Params struct {
// serialisable to send with Protocol.
type Promise interface{}
// Protocol is the interface for the peer protocol for testing or external
// Protocol is the interface for the peer protocol for testing or external
// alternative payment.
type Protocol interface {
Pay(int, Promise) // units, payment proof
@ -112,7 +112,7 @@ func New(local *Params, pm Payment, proto Protocol) (self *Swap, err error) {
return
}
// SetRemote is the entry point for setting remote swap profile
// SetRemote is the entry point for setting remote swap profile
// (e.g from handshake or other message).
func (s *Swap) SetRemote(remote *Profile) {
defer s.lock.Unlock()