Skip to content

Commit 32fc8df

Browse files
committed
incus: Remove unused functions
Signed-off-by: Stéphane Graber <[email protected]>
1 parent c95ce4c commit 32fc8df

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

cmd/incus/completion.go

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ import (
1414
"github.com/lxc/incus/v6/shared/api"
1515
)
1616

17-
func (g *cmdGlobal) appendCompletion(comps []string, comp, toComplete, remote string) []string {
18-
if remote != g.conf.DefaultRemote || strings.Contains(toComplete, g.conf.DefaultRemote) {
19-
comp = fmt.Sprintf("%s:%s", remote, comp)
20-
}
21-
22-
if !strings.HasPrefix(comp, toComplete) {
23-
return comps
24-
}
25-
26-
return append(comps, comp)
27-
}
28-
2917
func (g *cmdGlobal) cmpClusterGroupNames(toComplete string) ([]string, cobra.ShellCompDirective) {
3018
var results []string
3119
cmpDirectives := cobra.ShellCompDirectiveNoFileComp
@@ -247,34 +235,6 @@ func (g *cmdGlobal) cmpImageFingerprintsFromRemote(toComplete string, remote str
247235
return results, cobra.ShellCompDirectiveNoFileComp
248236
}
249237

250-
func (g *cmdGlobal) cmpImageFingerprints(toComplete string) ([]string, cobra.ShellCompDirective) {
251-
results := []string{}
252-
var remote string
253-
cmpDirectives := cobra.ShellCompDirectiveNoFileComp
254-
255-
if strings.Contains(toComplete, ":") {
256-
remote = strings.Split(toComplete, ":")[0]
257-
} else {
258-
remote = g.conf.DefaultRemote
259-
}
260-
261-
remoteServer, _ := g.conf.GetImageServer(remote)
262-
263-
images, _ := remoteServer.GetImages()
264-
265-
for _, image := range images {
266-
results = g.appendCompletion(results, image.Fingerprint, toComplete, remote)
267-
}
268-
269-
if !strings.Contains(toComplete, ":") {
270-
remotes, directives := g.cmpRemotes(toComplete, true)
271-
results = append(results, remotes...)
272-
cmpDirectives |= directives
273-
}
274-
275-
return results, cmpDirectives
276-
}
277-
278238
func (g *cmdGlobal) cmpInstanceAllKeys() ([]string, cobra.ShellCompDirective) {
279239
keys := []string{}
280240
for k := range instance.InstanceConfigKeysAny {

0 commit comments

Comments
 (0)