Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #34 from ipfs/merge/cmdkit
Browse files Browse the repository at this point in the history
move cmdkit to go-ipfs-cmds
  • Loading branch information
Stebalien authored May 11, 2019
2 parents 5235798 + 54dcaf1 commit 6cc8fcc
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 697 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:
global:
- GOTFLAGS="-race"
matrix:
- BUILD_DEPTYPE=gx
- BUILD_DEPTYPE=gomod


Expand Down
9 changes: 0 additions & 9 deletions Makefile

This file was deleted.

23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
# go-ipfs-cmdkit

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
**[DEPRECATED]**

> tools used by go-ipfs-cmds and go-ipfs/commands
cmdkit offers some types, functions and values that are shared between go-ipfs/commands and its rewrite go-ipfs-cmds.

## Documentation

https://godoc.org/github.com/ipfs/go-ipfs-cmdkit

## Contribute

Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/NAME/issues)!

This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

### Want to hack on IPFS?

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
These types have been merged into [go-ipfs-cmds](https://github.com/ipfs/go-ipfs-cmds) and are now simply re-exports.

## License

Expand Down
56 changes: 0 additions & 56 deletions argument.go

This file was deleted.

1 change: 0 additions & 1 deletion ci/Jenkinsfile

This file was deleted.

72 changes: 0 additions & 72 deletions error.go

This file was deleted.

51 changes: 51 additions & 0 deletions facade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package cmdkit

import (
"reflect"

"github.com/ipfs/go-ipfs-cmds"
)

type (
Argument = cmds.Argument
ArgumentType = cmds.ArgumentType
Error = cmds.Error
ErrorType = cmds.ErrorType
HelpText = cmds.HelpText
OptMap = cmds.OptMap
Option = cmds.Option
)

const (
Invalid = cmds.Invalid
Bool = cmds.Bool
Int = cmds.Int
Uint = cmds.Uint
Int64 = cmds.Int64
Uint64 = cmds.Uint64
Float = cmds.Float
String = cmds.String
ArgString = cmds.ArgString
ArgFile = cmds.ArgFile
)

func BoolOption(names ...string) Option { return cmds.BoolOption(names...) }
func FloatOption(names ...string) Option { return cmds.FloatOption(names...) }
func Int64Option(names ...string) Option { return cmds.Int64Option(names...) }
func IntOption(names ...string) Option { return cmds.IntOption(names...) }
func NewOption(kind reflect.Kind, names ...string) Option { return cmds.NewOption(kind, names...) }
func StringOption(names ...string) Option { return cmds.StringOption(names...) }
func Uint64Option(names ...string) Option { return cmds.Uint64Option(names...) }
func UintOption(names ...string) Option { return cmds.UintOption(names...) }

func FileArg(name string, required, variadic bool, description string) Argument {
return cmds.FileArg(name, required, variadic, description)
}

func StringArg(name string, required, variadic bool, description string) Argument {
return cmds.StringArg(name, required, variadic, description)
}

func Errorf(code ErrorType, format string, args ...interface{}) Error {
return cmds.Errorf(code, format, args...)
}
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
module github.com/ipfs/go-ipfs-cmdkit

go 1.12

require github.com/ipfs/go-ipfs-cmds v0.0.7
34 changes: 34 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/ipfs/go-ipfs-cmds v0.0.7 h1:0N2NXxYAZn1kHpHrZMHZYRcVGJSxQogDD89oKc0GZMg=
github.com/ipfs/go-ipfs-cmds v0.0.7/go.mod h1:E5ou2OpwkAtR8LdneNdq4w1vPcrTWvh/6WPhjxGaX/Y=
github.com/ipfs/go-ipfs-files v0.0.2 h1:fEEjF4H+1t8SFOHqUGp0KqcwgIRlbD2bu8CAS2sIggE=
github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4=
github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc=
github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo=
github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM=
golang.org/x/net v0.0.0-20190227160552-c95aed5357e7 h1:C2F/nMkR/9sfUTpvR3QrjBuTdvMUC/cFajkphs1YLQo=
golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190302025703-b6889370fb10 h1:xQJI9OEiErEQ++DoXOHqEpzsGMrAv2Q2jyCpi7DmfpQ=
golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
18 changes: 0 additions & 18 deletions helptext.go

This file was deleted.

95 changes: 0 additions & 95 deletions json_test.go

This file was deleted.

Loading

0 comments on commit 6cc8fcc

Please sign in to comment.