Skip to content

Commit

Permalink
adjust error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos committed Jun 23, 2024
1 parent 88bd3f6 commit bd6307b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/dbctl/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
clientv3 "go.etcd.io/etcd/client/v3"
)

func newEmbeddedClient(storageDir string) (*clientv3.Client, error) {
func newEtcdClient(storageDir string) (*clientv3.Client, error) {
instance, err := etcd.New(storageDir)
if err != nil {
return nil, fmt.Errorf("failed to initialize instance: %w", err)
Expand All @@ -29,9 +29,9 @@ func jsonOutput(i any) error {

func command(f func(context.Context, *clientv3.Client, []string) (any, error)) func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, args []string) error {
client, err := newEmbeddedClient(flagStorageDir)
client, err := newEtcdClient(flagStorageDir)
if err != nil {
return fmt.Errorf("failed to initialize embedded client: %w", err)
return fmt.Errorf("failed to initialize etcd client: %w", err)
}
resp, err := f(cmd.Context(), client, args)
if err != nil {
Expand Down

0 comments on commit bd6307b

Please sign in to comment.