Skip to content

Commit 3b8e7b3

Browse files
authored
Merge pull request #3009 from jandubois/limatmpl
Move template locator and reader code into new limatmpl package
2 parents f8de2f8 + 0715393 commit 3b8e7b3

File tree

8 files changed

+359
-251
lines changed

8 files changed

+359
-251
lines changed

cmd/limactl/edit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"path/filepath"
99

1010
"github.com/lima-vm/lima/cmd/limactl/editflags"
11-
"github.com/lima-vm/lima/cmd/limactl/guessarg"
1211
"github.com/lima-vm/lima/pkg/editutil"
1312
"github.com/lima-vm/lima/pkg/instance"
13+
"github.com/lima-vm/lima/pkg/limatmpl"
1414
"github.com/lima-vm/lima/pkg/limayaml"
1515
networks "github.com/lima-vm/lima/pkg/networks/reconcile"
1616
"github.com/lima-vm/lima/pkg/store"
@@ -44,7 +44,7 @@ func editAction(cmd *cobra.Command, args []string) error {
4444
var err error
4545
var inst *store.Instance
4646
switch {
47-
case guessarg.SeemsYAMLPath(arg):
47+
case limatmpl.SeemsYAMLPath(arg):
4848
// absolute path is required for `limayaml.Validate`
4949
filePath, err = filepath.Abs(arg)
5050
if err != nil {

cmd/limactl/guessarg/guessarg.go

Lines changed: 0 additions & 65 deletions
This file was deleted.

cmd/limactl/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ func newApp() *cobra.Command {
155155
newProtectCommand(),
156156
newUnprotectCommand(),
157157
newTunnelCommand(),
158+
newTemplateCommand(),
158159
)
159160
if runtime.GOOS == "darwin" || runtime.GOOS == "linux" {
160161
rootCmd.AddCommand(startAtLoginCommand())

0 commit comments

Comments
 (0)