Commit 80dc4b35 authored by Siraj Ravel's avatar Siraj Ravel

gofmt-d and golint-d

parent 07bfa3ba
......@@ -2,7 +2,6 @@ package daemon
import (
"encoding/json"
"errors"
"fmt"
"io"
"net"
......@@ -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
......
......@@ -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
}
......
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