working commit
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/yaml"
|
||||
yaml "go.yaml.in/yaml/v4"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -76,9 +76,9 @@ func (util *Util) Hello(cmd *cobra.Command, args []string) {
|
||||
|
||||
func printResponse(res any, err error) {
|
||||
type Response struct {
|
||||
Error bool `json:"error" yaml:"error"`
|
||||
Message string `json:"message,omitempty" yaml:"message,omitempty"`
|
||||
Result any `json:"result,omitempty" yaml:"result,omitempty"`
|
||||
Error bool `yaml:"error" yaml:"error"`
|
||||
Message string `yaml:"message,omitempty" yaml:"message,omitempty"`
|
||||
Result any `yaml:"result,omitempty" yaml:"result,omitempty"`
|
||||
}
|
||||
resp := Response{}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user