cli, docs: Add a docs command for doc generation
This took a lot longer than it looks to get right. It's not perfect, but it now reliably generates documentation which we can put into gohugo.
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
docsUtil "github.com/purpleidea/mgmt/docs/util"
|
||||
"github.com/purpleidea/mgmt/lang/funcs"
|
||||
"github.com/purpleidea/mgmt/lang/funcs/simple"
|
||||
"github.com/purpleidea/mgmt/lang/interfaces"
|
||||
@@ -468,6 +469,8 @@ func LookupOperator(operator string, size int) (*types.Type, error) {
|
||||
// OperatorFunc is an operator function that performs an operation on N values.
|
||||
// XXX: Can we wrap SimpleFunc instead of having the boilerplate here ourselves?
|
||||
type OperatorFunc struct {
|
||||
*docsUtil.Metadata
|
||||
|
||||
Type *types.Type // Kind == Function, including operator arg
|
||||
|
||||
init *interfaces.Init
|
||||
|
||||
Reference in New Issue
Block a user