Skip to content

Commit d5a00f4

Browse files
committed
Move cmd/internal to subpackage
Signed-off-by: apostasie <[email protected]>
1 parent c115c49 commit d5a00f4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cmd/nerdctl/internal.go renamed to cmd/nerdctl/internal/internal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package internal
1818

1919
import (
2020
"github.com/spf13/cobra"
2121
)
2222

23-
func newInternalCommand() *cobra.Command {
23+
func NewInternalCommand() *cobra.Command {
2424
var internalCommand = &cobra.Command{
2525
Use: "internal",
2626
Short: "DO NOT EXECUTE MANUALLY",

cmd/nerdctl/internal_oci_hook.go renamed to cmd/nerdctl/internal/internal_oci_hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package internal
1818

1919
import (
2020
"errors"

cmd/nerdctl/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
"github.com/containerd/nerdctl/v2/cmd/nerdctl/completion"
3636
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
3737
"github.com/containerd/nerdctl/v2/cmd/nerdctl/image"
38+
"github.com/containerd/nerdctl/v2/cmd/nerdctl/internal"
3839
"github.com/containerd/nerdctl/v2/cmd/nerdctl/ipfs"
3940
"github.com/containerd/nerdctl/v2/cmd/nerdctl/login"
4041
"github.com/containerd/nerdctl/v2/cmd/nerdctl/namespace"
@@ -305,7 +306,7 @@ Config file ($NERDCTL_TOML): %s
305306
// #endregion
306307

307308
// Internal
308-
newInternalCommand(),
309+
internal.NewInternalCommand(),
309310

310311
// login
311312
login.NewLoginCommand(),

0 commit comments

Comments
 (0)