Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
module github.com/kstkn/hypersomnia

go 1.12
go 1.17

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/uuid v1.1.1
github.com/kstkn/envconfig v1.5.1
github.com/micro/go-micro v1.7.0
github.com/miekg/dns v1.1.15 // indirect
github.com/prometheus/common v0.6.0
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.3.0
)

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-log/log v0.1.0 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/hashicorp/consul/api v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-immutable-radix v1.1.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.1 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/hashicorp/serf v0.8.3 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/micro/mdns v0.1.0 // indirect
github.com/miekg/dns v1.1.15 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/hashstructure v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/sys v0.0.0-20190621062556-bf70e4678053 // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
)
2 changes: 1 addition & 1 deletion handler/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (h IndexHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
JsTemplates template.HTML
}{
append(h.localClient.ListEnvs(), h.webClient.ListEnvs()...),
templates.JsTemplates,
template.HTML(templates.JsTemplates),
}); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
Expand Down
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"github.com/kstkn/hypersomnia/micro"
)

//go:generate go run templates.go

var conf config.Config

func init() {
Expand Down
34 changes: 0 additions & 34 deletions templates.go

This file was deleted.

9 changes: 9 additions & 0 deletions templates/embed.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package templates

import _ "embed"

//go:embed index.html
var Index string

//go:embed js.html
var JsTemplates string
Loading