0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

docs: improve docs coverage

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani 2021-10-14 03:13:48 +00:00 committed by Ramkumar Chinchani
parent d930adbd49
commit 2d9c1f52ea
2 changed files with 19 additions and 0 deletions

View file

@ -733,6 +733,10 @@ var SwaggerInfo = swaggerInfo{Schemes: []string{}}
type s struct{}
func New() *s {
return &s{}
}
func (s *s) ReadDoc() string {
t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {

15
docs/docs_test.go Normal file
View file

@ -0,0 +1,15 @@
package docs_test
import (
"testing"
"github.com/anuvu/zot/docs"
. "github.com/smartystreets/goconvey/convey"
)
func TestDocs(t *testing.T) {
Convey("Read docs", t, func() {
s := docs.New()
So(s.ReadDoc(), ShouldNotBeEmpty)
})
}