Add debugging.

This commit is contained in:
Kalle Carlbark 2019-09-11 20:57:54 +02:00
parent dcf73c1daf
commit 7fb13bea74
No known key found for this signature in database
GPG key ID: 3FC0C93C5A5A0670

View file

@ -3,6 +3,7 @@ package netboxgo
import ( import (
"crypto/tls" "crypto/tls"
"encoding/json" "encoding/json"
"fmt"
"github.com/gorilla/schema" "github.com/gorilla/schema"
"github.com/pkg/errors" "github.com/pkg/errors"
"io/ioutil" "io/ioutil"
@ -198,6 +199,7 @@ func (n *NetBox) ListDevices(d *Dcim_Devices_List, f *DeviceFilter) error {
} }
deviceurl := n.RootURL + "/api/devices/" deviceurl := n.RootURL + "/api/devices/"
if (&DeviceFilter{} != f) { if (&DeviceFilter{} != f) {
fmt.Println("hoj")
form := url.Values{} form := url.Values{}
err := encoder.Encode(f, form) err := encoder.Encode(f, form)
if err != nil { if err != nil {