uncloud CLI tool and 'machine add' command to bootstrap a new cluster

This commit is contained in:
Pavel Sviderski
2024-08-24 20:14:47 +10:00
parent 3f13f6c0e6
commit d369884f7a
9 changed files with 425 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package cli
import (
"fmt"
"uncloud/internal/cli/config"
)
type CLI struct {
config *config.Config
}
func New(configPath string) (*CLI, error) {
cfg, err := config.NewFromFile(configPath)
if err != nil {
return nil, fmt.Errorf("read Uncloud config: %w", err)
}
return &CLI{
config: cfg,
}, nil
}