better pool and changed schema
This commit is contained in:
parent
6d4e4c31f3
commit
249d7c6844
4 changed files with 82 additions and 21 deletions
|
|
@ -13,7 +13,7 @@ const PVEScheme = "pve"
|
|||
|
||||
var ErrInvalidPVEURL = errors.New("invalid pve url scheme")
|
||||
|
||||
func ParseURL(s string) (node, id string, err error) {
|
||||
func ParseURL(s string) (pool, id string, err error) {
|
||||
u, err := url.Parse(s)
|
||||
if err != nil {
|
||||
return
|
||||
|
|
@ -25,6 +25,6 @@ func ParseURL(s string) (node, id string, err error) {
|
|||
return u.Host, strings.TrimPrefix(u.Path, "/"), nil
|
||||
}
|
||||
|
||||
func NewURL(node, id string) string {
|
||||
return fmt.Sprintf("%s://%s/%s", PVEScheme, node, id)
|
||||
func NewURL(pool, id string) string {
|
||||
return fmt.Sprintf("%s://%s/%s", PVEScheme, pool, id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue