You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/02/26 16:45:17 UTC
[incubator-trafficcontrol] 11/17: reference the nullable for table
reading
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 0f33d31831aafbe2769587e656da766dde73c926
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Fri Feb 23 13:58:42 2018 -0700
reference the nullable for table reading
---
traffic_ops/traffic_ops_golang/physlocation/phys_locations.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/physlocation/phys_locations.go b/traffic_ops/traffic_ops_golang/physlocation/phys_locations.go
index 543e0df..96d4039 100644
--- a/traffic_ops/traffic_ops_golang/physlocation/phys_locations.go
+++ b/traffic_ops/traffic_ops_golang/physlocation/phys_locations.go
@@ -24,7 +24,7 @@ import (
"fmt"
"github.com/apache/incubator-trafficcontrol/lib/go-log"
- "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+ tcapi "github.com/apache/incubator-trafficcontrol/lib/go-tc"
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/api"
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/dbhelpers"
@@ -33,10 +33,10 @@ import (
)
//we need a type alias to define functions on
-type TOPhysLocation tc.PhysLocationNullable
+type TOPhysLocation tcapi.PhysLocationNullable
//the refType is passed into the handlers where a copy of its type is used to decode the json.
-var refType = TOPhysLocation(tc.PhysLocationNullable{})
+var refType = TOPhysLocation(tcapi.PhysLocationNullable{})
func GetRefType() *TOPhysLocation {
return &refType
@@ -98,7 +98,7 @@ func (pl *TOPhysLocation) Read(db *sqlx.DB, parameters map[string]string, user a
physLocations := []interface{}{}
for rows.Next() {
- var s tc.PhysLocation
+ var s tcapi.PhysLocationNullable
if err = rows.StructScan(&s); err != nil {
log.Errorf("error parsing PhysLocation rows: %v", err)
return nil, []error{tc.DBError}, tc.SystemError
--
To stop receiving notification emails like this one, please contact
dangogh@apache.org.