mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-07 21:59:15 +00:00
uncloud CLI tool and 'machine add' command to bootstrap a new cluster
This commit is contained in:
1 parent
3f13f6c0e6
commit
d369884f7a
9 files changed
+425
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user