diff --git a/client.go b/client.go index 4733036..44973b1 100644 --- a/client.go +++ b/client.go @@ -14,12 +14,9 @@ import ( "github.com/netbox-community/go-netbox/v3/netbox/client" ) -// Client is the type we use to add custom functions -type Client client.NetBoxAPI - -// NetBoxAPI is the struct we use to glue everything together +// NetBoxAPI is the type we use to add custom functions type NetBoxAPI struct { - api Client + api client.NetBoxAPI Token string URL string } @@ -46,9 +43,8 @@ func NewNetBoxClient(token string, url string) (NetBoxAPI, error) { n := client.New(t, nil) // create a new variable for our custom functions - api := Client(*n) nb := NetBoxAPI{ - api: api, + api: *n, Token: token, URL: url, }