From a80a0d54e7c558cd4dd96516dd5e0f5c50e5878c Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Mon, 5 Jul 2021 16:52:23 +0200 Subject: [PATCH] cli: new sub-packages `clisqlclient` and `clisqlshell`. Release note: None --- pkg/cli/clisqlclient/BUILD.bazel | 8 ++++++++ pkg/cli/clisqlclient/doc.go | 15 +++++++++++++++ pkg/cli/clisqlshell/BUILD.bazel | 8 ++++++++ pkg/cli/clisqlshell/doc.go | 17 +++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 pkg/cli/clisqlclient/BUILD.bazel create mode 100644 pkg/cli/clisqlclient/doc.go create mode 100644 pkg/cli/clisqlshell/BUILD.bazel create mode 100644 pkg/cli/clisqlshell/doc.go diff --git a/pkg/cli/clisqlclient/BUILD.bazel b/pkg/cli/clisqlclient/BUILD.bazel new file mode 100644 index 000000000000..2601a1b702eb --- /dev/null +++ b/pkg/cli/clisqlclient/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "clisqlclient", + srcs = ["doc.go"], + importpath = "github.com/cockroachdb/cockroach/pkg/cli/clisqlclient", + visibility = ["//visibility:public"], +) diff --git a/pkg/cli/clisqlclient/doc.go b/pkg/cli/clisqlclient/doc.go new file mode 100644 index 000000000000..6eaa880d904a --- /dev/null +++ b/pkg/cli/clisqlclient/doc.go @@ -0,0 +1,15 @@ +// Copyright 2021 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +// Package clisqlclient contains code common to all CLI commands +// that establish SQL connections, including but not exclusively +// the SQL interactive shell. It also supports commands like +// 'cockroach node ls'. +package clisqlclient diff --git a/pkg/cli/clisqlshell/BUILD.bazel b/pkg/cli/clisqlshell/BUILD.bazel new file mode 100644 index 000000000000..4cf4e3044141 --- /dev/null +++ b/pkg/cli/clisqlshell/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "clisqlshell", + srcs = ["doc.go"], + importpath = "github.com/cockroachdb/cockroach/pkg/cli/clisqlshell", + visibility = ["//visibility:public"], +) diff --git a/pkg/cli/clisqlshell/doc.go b/pkg/cli/clisqlshell/doc.go new file mode 100644 index 000000000000..fe99a89ea225 --- /dev/null +++ b/pkg/cli/clisqlshell/doc.go @@ -0,0 +1,17 @@ +// Copyright 2021 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +// Package clisqlshell contains the code that powers CockroachDB's +// interactive SQL shell. +// +// Note that the common code that is shared with other CLI commands +// that are not interactive SQL shells but establish a SQL connection +// to a server should be placed in package clisqlclient instead. +package clisqlshell