mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
21 lines
311 B
Go
21 lines
311 B
Go
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
|
|
}
|