3
0

Add events docs template + logic

This commit is contained in:
Urban Klinc
2020-12-04 13:39:41 +01:00
parent 401f3d2c7c
commit 3b47701ffa
3 changed files with 56 additions and 20 deletions

View File

@@ -3,12 +3,13 @@ package codegen
import (
"flag"
"fmt"
"github.com/Masterminds/sprig"
"github.com/fsnotify/fsnotify"
"os"
"path/filepath"
"strings"
"text/template"
"github.com/Masterminds/sprig"
"github.com/fsnotify/fsnotify"
)
func Proc() {
@@ -191,6 +192,9 @@ func Proc() {
if genCode {
err = genEvents(tpls, eventDefs...)
}
if genDocs && err == nil {
err = genEventsDocs(tpls, docPath+docPathOptions, eventDefs...)
}
}
if outputErr(err, "failed to process events:\n") {