diff --git a/core/commands/add.go b/core/commands/add.go index 881975027..50cf293bb 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -102,7 +102,7 @@ remains to be implemented. }, nil }, }, - Type: &AddedObject{}, + Type: AddedObject{}, } func add(n *core.IpfsNode, readers []io.Reader) ([]*dag.Node, error) { diff --git a/core/commands/block.go b/core/commands/block.go index 37b08cafb..60c8f0f40 100644 --- a/core/commands/block.go +++ b/core/commands/block.go @@ -123,7 +123,7 @@ It reads from stdin, and is a base58 encoded multihash. Length: len(data), }, nil }, - Type: &Block{}, + Type: Block{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { block := res.Output().(*Block) diff --git a/core/commands/bootstrap.go b/core/commands/bootstrap.go index 4bfdc2dab..76f87ba44 100644 --- a/core/commands/bootstrap.go +++ b/core/commands/bootstrap.go @@ -112,7 +112,7 @@ in the bootstrap list). return &BootstrapOutput{added}, nil }, - Type: &BootstrapOutput{}, + Type: BootstrapOutput{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { v, ok := res.Output().(*BootstrapOutput) @@ -173,7 +173,7 @@ var bootstrapRemoveCmd = &cmds.Command{ return &BootstrapOutput{removed}, nil }, - Type: &BootstrapOutput{}, + Type: BootstrapOutput{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { v, ok := res.Output().(*BootstrapOutput) @@ -203,7 +203,7 @@ var bootstrapListCmd = &cmds.Command{ peers := cfg.Bootstrap return &BootstrapOutput{peers}, nil }, - Type: &BootstrapOutput{}, + Type: BootstrapOutput{}, Marshalers: cmds.MarshalerMap{ cmds.Text: bootstrapMarshaler, }, diff --git a/core/commands/commands.go b/core/commands/commands.go index 4d850a468..df447d290 100644 --- a/core/commands/commands.go +++ b/core/commands/commands.go @@ -36,7 +36,7 @@ func CommandsCmd(root *cmds.Command) *cmds.Command { return &buf, nil }, }, - Type: &Command{}, + Type: Command{}, } } diff --git a/core/commands/config.go b/core/commands/config.go index c51deb295..9a8607c20 100644 --- a/core/commands/config.go +++ b/core/commands/config.go @@ -95,7 +95,7 @@ Set the value of the 'datastore.path' key: return bytes.NewReader(buf), nil }, }, - Type: &ConfigField{}, + Type: ConfigField{}, Subcommands: map[string]*cmds.Command{ "show": configShowCmd, "edit": configEditCmd, diff --git a/core/commands/diag.go b/core/commands/diag.go index dabc74fdc..746868834 100644 --- a/core/commands/diag.go +++ b/core/commands/diag.go @@ -84,7 +84,7 @@ connected peers and latencies between them. return &DiagnosticOutput{output}, nil }, - Type: &DiagnosticOutput{}, + Type: DiagnosticOutput{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(r cmds.Response) (io.Reader, error) { output, ok := r.Output().(*DiagnosticOutput) diff --git a/core/commands/id.go b/core/commands/id.go index 3177e7b6b..c535470d9 100644 --- a/core/commands/id.go +++ b/core/commands/id.go @@ -91,7 +91,7 @@ if no peer is specified, prints out local peers info. return bytes.NewReader(marshaled), nil }, }, - Type: &IdOutput{}, + Type: IdOutput{}, } func printPeer(ps peer.Peerstore, p peer.ID) (interface{}, error) { diff --git a/core/commands/log.go b/core/commands/log.go index a5b494943..93f710ee9 100644 --- a/core/commands/log.go +++ b/core/commands/log.go @@ -48,5 +48,5 @@ output of a running daemon. Marshalers: cmds.MarshalerMap{ cmds.Text: MessageTextMarshaler, }, - Type: &MessageOutput{}, + Type: MessageOutput{}, } diff --git a/core/commands/ls.go b/core/commands/ls.go index 54c8cb345..35fef8fc2 100644 --- a/core/commands/ls.go +++ b/core/commands/ls.go @@ -89,7 +89,7 @@ it contains, with the following format: return strings.NewReader(s), nil }, }, - Type: &LsOutput{}, + Type: LsOutput{}, } func marshalLinks(links []Link) (s string) { diff --git a/core/commands/mount_unix.go b/core/commands/mount_unix.go index a46fe6dc7..e56151096 100644 --- a/core/commands/mount_unix.go +++ b/core/commands/mount_unix.go @@ -133,7 +133,7 @@ baz output.IPNS = nsdir return &output, nil }, - Type: &config.Mounts{}, + Type: config.Mounts{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { v := res.Output().(*config.Mounts) diff --git a/core/commands/object.go b/core/commands/object.go index 87890d335..19d02795f 100644 --- a/core/commands/object.go +++ b/core/commands/object.go @@ -108,7 +108,7 @@ multihash. return strings.NewReader(marshalled), nil }, }, - Type: &Object{}, + Type: Object{}, } var objectGetCmd = &cmds.Command{ @@ -162,7 +162,7 @@ This command outputs data in the following encodings: return node, nil }, - Type: &Node{}, + Type: Node{}, Marshalers: cmds.MarshalerMap{ cmds.EncodingType("protobuf"): func(res cmds.Response) (io.Reader, error) { node := res.Output().(*Node) @@ -232,7 +232,7 @@ Data should be in the format specified by . return strings.NewReader("added " + object.Hash), nil }, }, - Type: &Object{}, + Type: Object{}, } // objectData takes a key string and writes out the raw bytes of that node (if there is one) diff --git a/core/commands/pin.go b/core/commands/pin.go index 35e8e62cc..d9d8e830a 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -157,7 +157,7 @@ Use --type= to specify the type of pinned keys to list. Valid values are: return &KeyList{Keys: keys}, nil }, - Type: &KeyList{}, + Type: KeyList{}, Marshalers: cmds.MarshalerMap{ cmds.Text: KeyListTextMarshaler, }, diff --git a/core/commands/publish.go b/core/commands/publish.go index 966337376..757adf27c 100644 --- a/core/commands/publish.go +++ b/core/commands/publish.go @@ -86,7 +86,7 @@ Publish a to another public key: return strings.NewReader(s), nil }, }, - Type: &IpnsEntry{}, + Type: IpnsEntry{}, } func publish(n *core.IpfsNode, k crypto.PrivKey, ref string) (*IpnsEntry, error) { diff --git a/core/commands/refs.go b/core/commands/refs.go index 6133da24b..0cfc9bc31 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -71,7 +71,7 @@ Note: list all refs recursively with -r. return getRefs(n, req.Arguments(), unique, recursive) }, - Type: &KeyList{}, + Type: KeyList{}, Marshalers: cmds.MarshalerMap{ cmds.Text: KeyListTextMarshaler, }, diff --git a/core/commands/swarm.go b/core/commands/swarm.go index 4a37ef170..4345acecb 100644 --- a/core/commands/swarm.go +++ b/core/commands/swarm.go @@ -69,7 +69,7 @@ ipfs swarm peers lists the set of peers this node is connected to. Marshalers: cmds.MarshalerMap{ cmds.Text: stringListMarshaler, }, - Type: &stringList{}, + Type: stringList{}, } var swarmConnectCmd = &cmds.Command{ @@ -122,7 +122,7 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/QmaCpDMGvV2BGHeYERUEnRQAwe3N8Szb Marshalers: cmds.MarshalerMap{ cmds.Text: stringListMarshaler, }, - Type: &stringList{}, + Type: stringList{}, } func stringListMarshaler(res cmds.Response) (io.Reader, error) { diff --git a/core/commands/update.go b/core/commands/update.go index 17f258df7..bc4fd40c7 100644 --- a/core/commands/update.go +++ b/core/commands/update.go @@ -29,7 +29,7 @@ var UpdateCmd = &cmds.Command{ } return updateApply(n) }, - Type: &UpdateOutput{}, + Type: UpdateOutput{}, Subcommands: map[string]*cmds.Command{ "check": UpdateCheckCmd, "log": UpdateLogCmd, @@ -62,7 +62,7 @@ var UpdateCheckCmd = &cmds.Command{ } return updateCheck(n) }, - Type: &UpdateOutput{}, + Type: UpdateOutput{}, Marshalers: cmds.MarshalerMap{ cmds.Text: func(res cmds.Response) (io.Reader, error) { v := res.Output().(*UpdateOutput) diff --git a/core/commands/version.go b/core/commands/version.go index cec310036..446a6b63a 100644 --- a/core/commands/version.go +++ b/core/commands/version.go @@ -41,5 +41,5 @@ var VersionCmd = &cmds.Command{ return strings.NewReader(fmt.Sprintf("ipfs version %s\n", v.Version)), nil }, }, - Type: &VersionOutput{}, + Type: VersionOutput{}, }