func WithToken(token string) ClientOption {
	return hcloud.WithToken(token)
}
WithToken alias of hcloud.WithToken
package hcloud
import (
	"context"
	"fmt"
	"os"
	"github.com/hetznercloud/hcloud-go/hcloud"
)
func BuildClient(token string) (*Client, error) {
	if token == "" {
		token = os.Getenv("HCLOUD_TOKEN")
	}
	if token == "" {
		return nil, fmt.Errorf("argument `token` or environment variable `HCLOUD_TOKEN` is required")
	}
	opts := []hcloud.ClientOption{
		hcloud.WithToken(token),
	}
	if endpoint := os.Getenv("HCLOUD_ENDPOINT"); endpoint != "" {
		opts = append(opts, hcloud.WithEndpoint(endpoint))
	}
	return NewClient(opts...), nil
}
type ClientOption = hcloud.ClientOption