Skip to content

Commit

Permalink
Rename kouchctl to kivik
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Apr 27, 2021
1 parent 057c1a6 commit 93f7d23
Show file tree
Hide file tree
Showing 417 changed files with 323 additions and 332 deletions.
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ before:
builds:
- env:
- CGO_ENABLED=0
id: kouchctl
id: kivik
goos:
- linux
- windows
- darwin
main: ./cmd/kouchctl
binary: kouchctl
main: ./cmd/kivik
binary: kivik
archives:
- format: tar.gz
name_template: "kouchctl_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
name_template: "kivik_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
checksum:
name_template: 'checksums.txt'
Expand Down
4 changes: 4 additions & 0 deletions cmd/kivik/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kivik
-----

`kivik` is a very early-stage work-in-progress. The goal is to be a CLI tool to facilitate administration of CouchDB. Thing of it as a replacement for 'curl', tailor-made for CouchDB interaction and scripting.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/kouchctl/cmd/copy.go → cmd/kivik/cmd/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/config"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/config"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

type copy struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/kouchctl/cmd/copy_test.go → cmd/kivik/cmd/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

const methodCopy = "COPY"
Expand Down Expand Up @@ -180,7 +180,7 @@ func Test_copy_RunE(t *testing.T) {
})
tests.Add("from context", func(t *testing.T) interface{} {
return cmdTest{
args: []string{"--debug", "copy", "--kouchconfig", "./testdata/copy.yaml", "--target", "target"},
args: []string{"--debug", "copy", "--config", "./testdata/copy.yaml", "--target", "target"},
status: errors.ErrUnavailable,
}
})
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type deleteAtt struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_delete_attachment_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type deleteConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
"strings"
"testing"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_delete_config_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type deleteDB struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_delete_db_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_delete_doc_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_delete_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type descrAttachment struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_describe_attachment_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type descrDoc struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type descrVer struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
"github.com/spf13/cobra"

"github.com/go-kivik/kivik/v4"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"

"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type getAttachment struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_get_attachment_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type getConfig struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type getAllDBs struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type getSec struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_get_sec_RunE(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/kouchctl/cmd/get_test.go → cmd/kivik/cmd/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_get_RunE(t *testing.T) {
Expand All @@ -43,11 +43,11 @@ func Test_get_RunE(t *testing.T) {
status: errors.ErrUnavailable,
})
tests.Add("path only on command line", cmdTest{
args: []string{"--debug", "--kouchconfig", "./testdata/localhost.yaml", "get", "/foo/bar"},
args: []string{"--debug", "--config", "./testdata/localhost.yaml", "get", "/foo/bar"},
status: errors.ErrUnavailable,
})
tests.Add("document only on command line", cmdTest{
args: []string{"--debug", "--kouchconfig", "./testdata/localhost.yaml", "get", "bar"},
args: []string{"--debug", "--config", "./testdata/localhost.yaml", "get", "bar"},
status: errors.ErrUnavailable,
})
tests.Add("not found", func(t *testing.T) interface{} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type getVersion struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_get_version_RunE(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/kouchctl/cmd/ping.go → cmd/kivik/cmd/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
"github.com/spf13/cobra"

"github.com/go-kivik/couchdb/v4/chttp"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"

"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

type ping struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/kouchctl/cmd/ping_test.go → cmd/kivik/cmd/ping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_ping_RunE(t *testing.T) {
Expand All @@ -43,7 +43,7 @@ func Test_ping_RunE(t *testing.T) {
})

return cmdTest{
args: []string{"--kouchconfig", "./testdata/localhost.yaml", "ping", s.URL},
args: []string{"--config", "./testdata/localhost.yaml", "ping", s.URL},
}
})
tests.Add("no server provided", cmdTest{
Expand Down
4 changes: 2 additions & 2 deletions cmd/kouchctl/cmd/post.go → cmd/kivik/cmd/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/input"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/input"
)

type post struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_compact_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_compact_views_RunE(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/kouchctl/cmd/post_doc.go → cmd/kivik/cmd/post_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/input"
"github.com/go-kivik/xkivik/v4/cmd/kivik/input"
)

type postDoc struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_doc_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_flush_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/input"
"github.com/go-kivik/xkivik/v4/cmd/kouchctl/output"
"github.com/go-kivik/xkivik/v4/cmd/kivik/input"
"github.com/go-kivik/xkivik/v4/cmd/kivik/output"
)

type postPurge struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_purge_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/spf13/cobra"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

type postReplicate struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_replicate_RunE(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"gitlab.com/flimzy/testy"

"github.com/go-kivik/xkivik/v4/cmd/kouchctl/errors"
"github.com/go-kivik/xkivik/v4/cmd/kivik/errors"
)

func Test_post_RunE(t *testing.T) {
Expand Down
File renamed without changes.
Loading

0 comments on commit 93f7d23

Please sign in to comment.