File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
"os/user"
6
6
"path/filepath"
7
7
"runtime"
8
+ "strings"
8
9
"testing"
9
10
10
11
"github.com/lima-vm/lima/pkg/limayaml"
@@ -15,6 +16,7 @@ const separator = string(filepath.Separator)
15
16
16
17
var vmtype = limayaml .QEMU
17
18
var goarch = limayaml .NewArch (runtime .GOARCH )
19
+ var space = strings .Repeat (" " , len (goarch )- 4 )
18
20
19
21
var instance = Instance {
20
22
Name : "foo" ,
@@ -33,7 +35,7 @@ var tableEmu = "NAME STATUS SSH ARCH CPUS MEMORY D
33
35
var tableHome = "NAME STATUS SSH CPUS MEMORY DISK DIR\n " +
34
36
"foo Stopped 127.0.0.1:0 0 0B 0B ~" + separator + "dir\n "
35
37
36
- var tableAll = "NAME STATUS SSH VMTYPE ARCH CPUS MEMORY DISK DIR\n " +
38
+ var tableAll = "NAME STATUS SSH VMTYPE ARCH" + space + " CPUS MEMORY DISK DIR\n " +
37
39
"foo Stopped 127.0.0.1:0 " + vmtype + " " + goarch + " 0 0B 0B dir\n "
38
40
39
41
// for width 60, everything is hidden
@@ -49,7 +51,7 @@ var table80d = "NAME STATUS SSH ARCH CPUS MEMORY D
49
51
"foo Stopped 127.0.0.1:0 unknown 0 0B 0B\n "
50
52
51
53
// for width 100, nothing is hidden
52
- var table100 = "NAME STATUS SSH VMTYPE ARCH CPUS MEMORY DISK DIR\n " +
54
+ var table100 = "NAME STATUS SSH VMTYPE ARCH" + space + " CPUS MEMORY DISK DIR\n " +
53
55
"foo Stopped 127.0.0.1:0 " + vmtype + " " + goarch + " 0 0B 0B dir\n "
54
56
55
57
// for width 80, directory is hidden (if not identical)
You can’t perform that action at this time.
0 commit comments