Skip to content

Commit

Permalink
gofmt-d and golint-d
Browse files Browse the repository at this point in the history
  • Loading branch information
llSourcell committed Sep 10, 2014
1 parent 07bfa3b commit 80dc4b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package daemon

import (
"encoding/json"
"errors"
"fmt"
"io"
"net"
Expand All @@ -13,14 +12,15 @@ import (
u "github.com/jbenet/go-ipfs/util"
)

var ErrInvalidCommand = errors.New("invalid command")

//DaemonListener listens to an initialized IPFS node and can send it commands instead of
//starting up a new set of connections
type DaemonListener struct {
node *core.IpfsNode
list net.Listener
closed bool
}

//Command accepts user input and can be sent to the running IPFS node
type Command struct {
Command string
Args []string
Expand Down
9 changes: 4 additions & 5 deletions daemon/daemon_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"io"
"net"
"os"
"time"
"time"
)


//connects to the address on the network with a timeout and encodes the connection into JSON
//SendCommand connects to the address on the network with a timeout and encodes the connection into JSON
func SendCommand(command *Command, server string) error {

conn, err := net.DialTimeout("tcp", server, time.Millisecond*300)

if err != nil {
return err
}
Expand Down

0 comments on commit 80dc4b3

Please sign in to comment.