File tree Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 14
14
limitations under the License.
15
15
*/
16
16
17
- package main
17
+ package login
18
18
19
19
import (
20
20
"errors"
@@ -30,7 +30,7 @@ import (
30
30
"github.com/containerd/nerdctl/v2/pkg/cmd/login"
31
31
)
32
32
33
- func newLoginCommand () * cobra.Command {
33
+ func NewLoginCommand () * cobra.Command {
34
34
var loginCommand = & cobra.Command {
35
35
Use : "login [flags] [SERVER]" ,
36
36
Args : cobra .MaximumNArgs (1 ),
Original file line number Diff line number Diff line change 14
14
limitations under the License.
15
15
*/
16
16
17
- package main
17
+ package login
18
18
19
19
import (
20
20
"crypto/rand"
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright The containerd Authors.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ package login
18
+
19
+ import (
20
+ "testing"
21
+
22
+ "github.com/containerd/nerdctl/v2/pkg/testutil"
23
+ )
24
+
25
+ func TestMain (m * testing.M ) {
26
+ testutil .M (m )
27
+ }
Original file line number Diff line number Diff line change 14
14
limitations under the License.
15
15
*/
16
16
17
- package main
17
+ package login
18
18
19
19
import (
20
20
"fmt"
@@ -25,7 +25,7 @@ import (
25
25
"github.com/containerd/nerdctl/v2/pkg/imgutil/dockerconfigresolver"
26
26
)
27
27
28
- func newLogoutCommand () * cobra.Command {
28
+ func NewLogoutCommand () * cobra.Command {
29
29
var logoutCommand = & cobra.Command {
30
30
Use : "logout [flags] [SERVER]" ,
31
31
Args : cobra .MaximumNArgs (1 ),
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import (
34
34
35
35
"github.com/containerd/nerdctl/v2/cmd/nerdctl/completion"
36
36
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
37
+ "github.com/containerd/nerdctl/v2/cmd/nerdctl/login"
37
38
"github.com/containerd/nerdctl/v2/cmd/nerdctl/namespace"
38
39
"github.com/containerd/nerdctl/v2/cmd/nerdctl/network"
39
40
"github.com/containerd/nerdctl/v2/cmd/nerdctl/volume"
@@ -305,10 +306,10 @@ Config file ($NERDCTL_TOML): %s
305
306
newInternalCommand (),
306
307
307
308
// login
308
- newLoginCommand (),
309
+ login . NewLoginCommand (),
309
310
310
311
// Logout
311
- newLogoutCommand (),
312
+ login . NewLogoutCommand (),
312
313
313
314
// Compose
314
315
newComposeCommand (),
You can’t perform that action at this time.
0 commit comments