mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-18 03:05:28 +00:00
20 lines
378 B
Go
20 lines
378 B
Go
// Copyright 2019 The Kubernetes Authors.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package execplugin
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
shlex "github.com/carapace-sh/carapace-shlex"
|
|
)
|
|
|
|
func ShlexSplit(s string) ([]string, error) {
|
|
// return shlexSplit(s)
|
|
tokens, err := shlex.Split(s)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("shlex split error: %w", err)
|
|
}
|
|
return tokens.Strings(), nil
|
|
}
|