File tree Expand file tree Collapse file tree 10 files changed +44
-16
lines changed Expand file tree Collapse file tree 10 files changed +44
-16
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 container
18
18
19
19
import (
20
20
"fmt"
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import (
43
43
"github.com/containerd/nerdctl/v2/cmd/nerdctl/login"
44
44
"github.com/containerd/nerdctl/v2/cmd/nerdctl/namespace"
45
45
"github.com/containerd/nerdctl/v2/cmd/nerdctl/network"
46
+ "github.com/containerd/nerdctl/v2/cmd/nerdctl/system"
46
47
"github.com/containerd/nerdctl/v2/cmd/nerdctl/volume"
47
48
"github.com/containerd/nerdctl/v2/pkg/config"
48
49
ncdefaults "github.com/containerd/nerdctl/v2/pkg/defaults"
@@ -286,8 +287,8 @@ Config file ($NERDCTL_TOML): %s
286
287
// #endregion
287
288
288
289
// #region System
289
- newEventsCommand (),
290
- newInfoCommand (),
290
+ system . NewEventsCommand (),
291
+ system . NewInfoCommand (),
291
292
newVersionCommand (),
292
293
// #endregion
293
294
@@ -303,7 +304,7 @@ Config file ($NERDCTL_TOML): %s
303
304
image .NewImageCommand (),
304
305
network .NewNetworkCommand (),
305
306
volume .NewVolumeCommand (),
306
- newSystemCommand (),
307
+ system . NewSystemCommand (),
307
308
namespace .NewNamespaceCommand (),
308
309
builder .NewBuilderCommand (),
309
310
// #endregion
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 system
18
18
19
19
import (
20
20
"github.com/spf13/cobra"
21
21
22
22
"github.com/containerd/nerdctl/v2/cmd/nerdctl/helpers"
23
23
)
24
24
25
- func newSystemCommand () * cobra.Command {
25
+ func NewSystemCommand () * cobra.Command {
26
26
var systemCommand = & cobra.Command {
27
27
Annotations : map [string ]string {helpers .Category : helpers .Management },
28
28
Use : "system" ,
@@ -33,8 +33,8 @@ func newSystemCommand() *cobra.Command {
33
33
}
34
34
// versionCommand is not here
35
35
systemCommand .AddCommand (
36
- newEventsCommand (),
37
- newInfoCommand (),
36
+ NewEventsCommand (),
37
+ NewInfoCommand (),
38
38
newSystemPruneCommand (),
39
39
)
40
40
return systemCommand
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 system
18
18
19
19
import (
20
20
"github.com/spf13/cobra"
@@ -25,7 +25,7 @@ import (
25
25
"github.com/containerd/nerdctl/v2/pkg/cmd/system"
26
26
)
27
27
28
- func newEventsCommand () * cobra.Command {
28
+ func NewEventsCommand () * cobra.Command {
29
29
shortHelp := `Get real time events from the server`
30
30
longHelp := shortHelp + "\n NOTE: The output format is not compatible with Docker."
31
31
var eventsCommand = & cobra.Command {
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 system
18
18
19
19
import (
20
20
"fmt"
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 system
18
18
19
19
import (
20
20
"github.com/spf13/cobra"
@@ -25,7 +25,7 @@ import (
25
25
"github.com/containerd/nerdctl/v2/pkg/cmd/system"
26
26
)
27
27
28
- func newInfoCommand () * cobra.Command {
28
+ func NewInfoCommand () * cobra.Command {
29
29
var infoCommand = & cobra.Command {
30
30
Use : "info" ,
31
31
Args : cobra .NoArgs ,
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 system
18
18
19
19
import (
20
20
"encoding/json"
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 system
18
18
19
19
import (
20
20
"fmt"
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 system
18
18
19
19
import (
20
20
"bytes"
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 system
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
+ }
You can’t perform that action at this time.
0 commit comments