@@ -2,6 +2,7 @@ package v3
22
33import (
44 "crypto/sha1"
5+ "encoding/hex"
56 "io"
67 autoscalingv2 "k8s.io/api/autoscaling/v2"
78 corev1 "k8s.io/api/core/v1"
@@ -31,7 +32,7 @@ type WMSWFS interface {
3132 Options () * Options
3233 HasPostgisData () bool
3334 // Sha1 hash of the objects name
34- Id () string
35+ ID () string
3536}
3637
3738type Mapfile struct {
@@ -109,19 +110,19 @@ func GetHost() string {
109110}
110111
111112func GetBaseURLPath [T * WFS | * WMS ](o T ) string {
112- var serviceUrl string
113+ var serviceURL string
113114 switch any (o ).(type ) {
114115 case * WFS :
115116 if WFS , ok := any (o ).(* WFS ); ok {
116- serviceUrl = WFS .Spec .Service .URL
117+ serviceURL = WFS .Spec .Service .URL
117118 }
118119 case * WMS :
119120 if WMS , ok := any (o ).(* WMS ); ok {
120- serviceUrl = WMS .Spec .Service .URL
121+ serviceURL = WMS .Spec .Service .URL
121122 }
122123 }
123124
124- parsed , _ := url .Parse (serviceUrl )
125+ parsed , _ := url .Parse (serviceURL )
125126 return strings .TrimPrefix (parsed .Path , "/" )
126127}
127128
@@ -160,7 +161,7 @@ func (d *Data) GetGeometryType() *string {
160161
161162func Sha1HashOfName [O WMSWFS ](obj O ) string {
162163 s := sha1 .New ()
163- io .WriteString (s , obj .GetName ())
164+ _ , _ = io .WriteString (s , obj .GetName ())
164165
165- return string (s .Sum (nil ))
166+ return hex . EncodeToString (s .Sum (nil ))
166167}
0 commit comments