Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #60 from philips/use-goven
Browse files Browse the repository at this point in the history
chore(*): use goven for all dependencies
  • Loading branch information
philips committed Feb 7, 2014
2 parents 507dbf1 + e646586 commit b22a4af
Show file tree
Hide file tree
Showing 89 changed files with 623 additions and 5,585 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ _testmain.go

*.exe

src/
pkg/
/etcdctl
release_version.go
/src
/pkg
/bin
28 changes: 7 additions & 21 deletions build
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
#!/bin/bash
#!/bin/sh -e

ETCD_PACKAGE=github.com/coreos/etcdctl
export GOPATH="${PWD}"
SRC_DIR="$GOPATH/src"
ETCD_DIR="$SRC_DIR/$ETCD_PACKAGE"

ETCD_BASE=$(dirname "${ETCD_DIR}")
if [ ! -d "${ETCD_BASE}" ]; then
mkdir -p "${ETCD_BASE}"
fi

if [ ! -h "${ETCD_DIR}" ]; then
ln -s ../../../ "${ETCD_DIR}"
if [ ! -h src/github.com/coreos/etcdctl ]; then
mkdir -p src/github.com/coreos/
ln -s ../../.. src/github.com/coreos/etcdctl
fi

for i in third_party/*; do
if [ "$i" = "third_party/src" ]; then
continue
fi
cp -R "$i" src/
done
export GOBIN=${PWD}/bin
export GOPATH=${PWD}

./scripts/release-version > release_version.go
go build "${ETCD_PACKAGE}"
go install github.com/coreos/etcdctl
10 changes: 5 additions & 5 deletions command/exec_watch_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import (
"os/exec"
"os/signal"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewExecWatchCommand returns the CLI command for "exec-watch".
func NewExecWatchCommand() cli.Command {
return cli.Command{
Name: "exec-watch",
Usage: "watch a key for changes and exec an executable",
Name: "exec-watch",
Usage: "watch a key for changes and exec an executable",
Flags: []cli.Flag{
cli.IntFlag{"after-index", 0, "watch after the given index", false},
cli.IntFlag{"after-index", 0, "watch after the given index"},
cli.BoolFlag{"recursive", "watch all values for key and child keys"},
},
Action: func(c *cli.Context) {
Expand Down
8 changes: 4 additions & 4 deletions command/get_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewGetCommand returns the CLI command for "get".
func NewGetCommand() cli.Command {
return cli.Command{
Name: "get",
Usage: "retrieve the value of a key",
Name: "get",
Usage: "retrieve the value of a key",
Flags: []cli.Flag{
cli.BoolFlag{"sort", "returns result in sorted order"},
cli.BoolFlag{"consistent", "send request to the leader, thereby guranteeing that any earlier writes will be seen by the read"},
Expand Down
4 changes: 2 additions & 2 deletions command/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

type handlerFunc func(*cli.Context, *etcd.Client) (*etcd.Response, error)
Expand Down
8 changes: 4 additions & 4 deletions command/ls_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package command
import (
"fmt"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

func NewLsCommand() cli.Command {
return cli.Command{
Name: "ls",
Usage: "retrieve a directory",
Name: "ls",
Usage: "retrieve a directory",
Flags: []cli.Flag{
cli.BoolFlag{"recursive", "returns all values for key and child keys"},
},
Expand Down
10 changes: 5 additions & 5 deletions command/mk_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewMakeCommand returns the CLI command for "mk".
func NewMakeCommand() cli.Command {
return cli.Command{
Name: "mk",
Usage: "make a new key with a given value",
Name: "mk",
Usage: "make a new key with a given value",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
},
Action: func(c *cli.Context) {
handleKey(c, makeCommandFunc)
Expand Down
10 changes: 5 additions & 5 deletions command/mkdir_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewMakeDirCommand returns the CLI command for "mkdir".
func NewMakeDirCommand() cli.Command {
return cli.Command{
Name: "mkdir",
Usage: "make a new directory",
Name: "mkdir",
Usage: "make a new directory",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
},
Action: func(c *cli.Context) {
handleKey(c, makeDirCommandFunc)
Expand Down
8 changes: 4 additions & 4 deletions command/rm_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewRemoveCommand returns the CLI command for "rm".
func NewRemoveCommand() cli.Command {
return cli.Command{
Name: "rm",
Usage: "remove a key",
Name: "rm",
Usage: "remove a key",
Flags: []cli.Flag{
cli.BoolFlag{"dir", "removes the key if it is an empty directory or a key-value pair"},
cli.BoolFlag{"recursive", "removes the key and all child keys(if it is a directory)"},
Expand Down
8 changes: 4 additions & 4 deletions command/rmdir_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewRemoveCommand returns the CLI command for "rmdir".
func NewRemoveDirCommand() cli.Command {
return cli.Command{
Name: "rmdir",
Usage: "removes the key if it is an empty directory or a key-value pair",
Name: "rmdir",
Usage: "removes the key if it is an empty directory or a key-value pair",
Action: func(c *cli.Context) {
handleKey(c, removeDirCommandFunc)
},
Expand Down
14 changes: 7 additions & 7 deletions command/set_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewSetCommand returns the CLI command for "set".
func NewSetCommand() cli.Command {
return cli.Command{
Name: "set",
Usage: "set the value of a key",
Name: "set",
Usage: "set the value of a key",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.StringFlag{"swap-with-value", "", "previous value", false},
cli.IntFlag{"swap-with-index", 0, "previous index", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
cli.StringFlag{"swap-with-value", "", "previous value"},
cli.IntFlag{"swap-with-index", 0, "previous index"},
},
Action: func(c *cli.Context) {
handleKey(c, setCommandFunc)
Expand Down
10 changes: 5 additions & 5 deletions command/set_dir_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewSetDirCommand returns the CLI command for "setDir".
func NewSetDirCommand() cli.Command {
return cli.Command{
Name: "setdir",
Usage: "create a new or existing directory",
Name: "setdir",
Usage: "create a new or existing directory",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
},
Action: func(c *cli.Context) {
handleKey(c, setDirCommandFunc)
Expand Down
10 changes: 5 additions & 5 deletions command/update_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewUpdateCommand returns the CLI command for "update".
func NewUpdateCommand() cli.Command {
return cli.Command{
Name: "update",
Usage: "update an existing key with a given value",
Name: "update",
Usage: "update an existing key with a given value",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
},
Action: func(c *cli.Context) {
handleKey(c, updateCommandFunc)
Expand Down
10 changes: 5 additions & 5 deletions command/update_dir_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package command
import (
"errors"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewUpdateDirCommand returns the CLI command for "updateDir".
func NewUpdateDirCommand() cli.Command {
return cli.Command{
Name: "updatedir",
Usage: "update an existing directory",
Name: "updatedir",
Usage: "update an existing directory",
Flags: []cli.Flag{
cli.IntFlag{"ttl", 0, "key time-to-live", false},
cli.IntFlag{"ttl", 0, "key time-to-live"},
},
Action: func(c *cli.Context) {
handleKey(c, updateDirCommandFunc)
Expand Down
10 changes: 5 additions & 5 deletions command/watch_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import (
"os"
"os/signal"

"github.com/codegangsta/cli"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
"github.com/coreos/etcdctl/third_party/github.com/coreos/go-etcd/etcd"
)

// NewWatchCommand returns the CLI command for "watch".
func NewWatchCommand() cli.Command {
return cli.Command{
Name: "watch",
Usage: "watch a key for changes",
Name: "watch",
Usage: "watch a key for changes",
Flags: []cli.Flag{
cli.BoolFlag{"forever", "forever watch a key until CTRL+C"},
cli.IntFlag{"after-index", 0, "watch after the given index", false},
cli.IntFlag{"after-index", 0, "watch after the given index"},
cli.BoolFlag{"recursive", "returns all values for key and child keys"},
},
Action: func(c *cli.Context) {
Expand Down
6 changes: 3 additions & 3 deletions etcdctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/codegangsta/cli"
"github.com/coreos/etcdctl/command"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
)

func main() {
Expand All @@ -14,8 +14,8 @@ func main() {
app.Usage = "A simple command line client for etcd."
app.Flags = []cli.Flag{
cli.BoolFlag{"debug", "output cURL commands which can be used to reproduce the request"},
cli.StringFlag{"output, o", "simple", "output response in the given format (`simple` or `json`)", false},
cli.StringFlag{"peers, C", "127.0.0.1:4001", "a comma seperated list of machine addresses in the cluster", false},
cli.StringFlag{"output, o", "simple", "output response in the given format (`simple` or `json`)"},
cli.StringFlag{"peers, C", "127.0.0.1:4001", "a comma seperated list of machine addresses in the cluster"},
}
app.Commands = []cli.Command{
command.NewMakeCommand(),
Expand Down
3 changes: 3 additions & 0 deletions release_version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

const releaseVersion = "v0.2.0-git"
1 change: 0 additions & 1 deletion third_party/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions third_party/bitbucket.org/kardianos/osext/LICENSE

This file was deleted.

Loading

0 comments on commit b22a4af

Please sign in to comment.