aboutsummaryrefslogtreecommitdiff
path: root/instance.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-12-01 13:01:51 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-12-01 13:01:51 +0100
commitf7af98fc6ef283155f94f4294a430d8e792b9a7b (patch)
treec52bc43012d14bd91413739d2d5e992e26c15d0e /instance.go
parent868366cf35e2e649fe7265201d527dbb76bbaf68 (diff)
removed explicit string function
Diffstat (limited to 'instance.go')
-rw-r--r--instance.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/instance.go b/instance.go
index 8d9070a..1eb2b7c 100644
--- a/instance.go
+++ b/instance.go
@@ -28,10 +28,6 @@ const (
EndpointGetSth = Endpoint("get-sth")
)
-func (e Endpoint) String() string {
- return string(e)
-}
-
// TODO: type EndpointParam string?
// Instance is an instance of a particular log front-end
@@ -122,27 +118,27 @@ func (i *Instance) registerHandlers(mux *http.ServeMux) {
handler handler
}{
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointAddEntry.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointAddEntry)}, "/"),
handler{instance: i, handler: addEntry, endpoint: EndpointAddEntry, method: http.MethodPost},
},
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointGetEntries.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointGetEntries)}, "/"),
handler{instance: i, handler: getEntries, endpoint: EndpointGetEntries, method: http.MethodGet},
},
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointGetAnchors.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointGetAnchors)}, "/"),
handler{instance: i, handler: getAnchors, endpoint: EndpointGetAnchors, method: http.MethodGet},
},
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointGetProofByHash.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointGetProofByHash)}, "/"),
handler{instance: i, handler: getProofByHash, endpoint: EndpointGetProofByHash, method: http.MethodGet},
},
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointGetConsistencyProof.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointGetConsistencyProof)}, "/"),
handler{instance: i, handler: getConsistencyProof, endpoint: EndpointGetConsistencyProof, method: http.MethodGet},
},
{
- strings.Join([]string{"", i.LogParameters.Prefix, EndpointGetSth.String()}, "/"),
+ strings.Join([]string{"", i.LogParameters.Prefix, string(EndpointGetSth)}, "/"),
handler{instance: i, handler: getSth, endpoint: EndpointGetSth, method: http.MethodGet},
},
} {