package server import ( "html/template" "io" "time" ) //go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_template_writer.go TemplateWriter // TemplateWriter is an interface over html/template that's used to enable // mocking. type TemplateWriter interface { // Execute applies a parsed template to the specified data object, // writing the output to wr. Execute(wr io.Writer, data interface{}) error } // LockIndexData holds the fields needed to display the index view for locks. type LockIndexData struct { LockURL string RepoFullName string PullNum int Time time.Time } var indexTemplate = template.Must(template.New("index.html.tmpl").Parse(`
atlantis
Plan discarded and unlocked!
Locks
{{ if . }} {{ range . }} {{ end }} {{ else }}No locks found.
{{ end }}atlantis
{{.LockKey}} Locked
Repo Owner: {{.RepoOwner}}Repo Name: {{.RepoName}}Pull Request Link: {{.PullRequestLink}}Locked By: {{.LockedBy}}Workspace: {{.Workspace}}