mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
uncloud CLI tool and 'machine add' command to bootstrap a new cluster
This commit is contained in:
@@ -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