Skip to content

Commit 35a3e39

Browse files
committed
More s/example/template/ (follow-up to PR 1679)
Signed-off-by: Akihiro Suda <[email protected]>
1 parent f15d17f commit 35a3e39

40 files changed

+63
-63
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ $ limactl start
159159
? Creating an instance "default" [Use arrows to move, type to filter]
160160
> Proceed with the current configuration
161161
Open an editor to review or modify the current configuration
162-
Choose another example (docker, podman, archlinux, fedora, ...)
162+
Choose another template (docker, podman, archlinux, fedora, ...)
163163
Exit
164164
...
165165
INFO[0029] READY. Run `lima` to open the shell.
@@ -189,7 +189,7 @@ $ limactl start --list-templates
189189

190190
To create an instance "default" from a local file:
191191
```console
192-
$ limactl start --name=default /usr/local/share/lima/examples/fedora.yaml
192+
$ limactl start --name=default /usr/local/share/lima/templates/fedora.yaml
193193
```
194194

195195
To create an instance "default" from a remote URL (use carefully, with a trustable source):

cmd/limactl/start.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func chooseNextCreatorState(st *creatorState) (*creatorState, error) {
340340
Options: []string{
341341
"Proceed with the current configuration",
342342
"Open an editor to review or modify the current configuration",
343-
"Choose another example (docker, podman, archlinux, fedora, ...)",
343+
"Choose another template (docker, podman, archlinux, fedora, ...)",
344344
"Exit",
345345
},
346346
}
@@ -370,26 +370,26 @@ func chooseNextCreatorState(st *creatorState) (*creatorState, error) {
370370
return st, errors.New("should not reach here")
371371
}
372372
return st, nil
373-
case prompt.Options[2]: // "Choose another example..."
374-
examples, err := templatestore.Templates()
373+
case prompt.Options[2]: // "Choose another template..."
374+
templates, err := templatestore.Templates()
375375
if err != nil {
376376
return st, err
377377
}
378378
var ansEx int
379379
promptEx := &survey.Select{
380-
Message: "Choose an example",
381-
Options: make([]string, len(examples)),
380+
Message: "Choose a template",
381+
Options: make([]string, len(templates)),
382382
}
383-
for i := range examples {
384-
promptEx.Options[i] = examples[i].Name
383+
for i := range templates {
384+
promptEx.Options[i] = templates[i].Name
385385
}
386386
if err := survey.AskOne(promptEx, &ansEx); err != nil {
387387
return st, err
388388
}
389-
if ansEx > len(examples)-1 {
390-
return st, fmt.Errorf("invalid answer %d for %d entries", ansEx, len(examples))
389+
if ansEx > len(templates)-1 {
390+
return st, fmt.Errorf("invalid answer %d for %d entries", ansEx, len(templates))
391391
}
392-
yamlPath := examples[ansEx].Location
392+
yamlPath := templates[ansEx].Location
393393
st.instName, err = guessarg.InstNameFromYAMLPath(yamlPath)
394394
if err != nil {
395395
return nil, err

examples/almalinux-8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.8.3 or later.
1+
# This template requires Lima v0.8.3 or later.
22

33
# NOTE: EL8-based distros are known not to work on M1 chips: https://github.com/lima-vm/lima/issues/841
44
# EL9-based distros are known to work.

examples/almalinux-9.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.11.1 or later.
1+
# This template requires Lima v0.11.1 or later.
22

33
images:
44
- location: "https://repo.almalinux.org/almalinux/9.2/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2"

examples/alpine.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.7.0 or later.
1+
# This template requires Lima v0.7.0 or later.
22
# Using the Alpine 3.18 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
33

44
images:

examples/apptainer-rootful.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use Apptainer instead of containerd & nerdctl
1+
# A template to use Apptainer instead of containerd & nerdctl
22
# $ limactl start ./apptainer-rootful.yaml
33
# $ limactl shell apptainer-rootful apptainer run -u -B $HOME:$HOME docker://alpine
44

examples/apptainer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use Apptainer instead of containerd & nerdctl
1+
# A template to use Apptainer instead of containerd & nerdctl
22
# $ limactl start ./apptainer.yaml
33
# $ limactl shell apptainer apptainer run -u -B $HOME:$HOME docker://alpine
44

examples/archlinux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.7.0 or later
1+
# This template requires Lima v0.7.0 or later
22
images:
33
# Try to use yyyyMMdd.REV image if available. Note that yyyyMMdd.REV will be removed after several months.
44
- location: "https://geo.mirror.pkgbuild.com/images/v20230715.165098/Arch-Linux-x86_64-cloudimg-20230715.165098.qcow2"

examples/buildkit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use BuildKit
1+
# A template to use BuildKit
22
# $ limactl start ./buildkit.yaml
33

44
# To run `buildkit` on the host (assumes buildctl is installed):

examples/centos-stream-8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.8.3 or later.
1+
# This template requires Lima v0.8.3 or later.
22

33
# NOTE: EL8-based distros are known not to work on M1 chips: https://github.com/lima-vm/lima/issues/841
44
# EL9-based distros are known to work.

0 commit comments

Comments
 (0)