-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb820bc
commit 4663a45
Showing
9 changed files
with
4,644 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package main | ||
|
||
import ( | ||
"go/build" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/princjef/gomarkdoc" | ||
"github.com/princjef/gomarkdoc/lang" | ||
"github.com/princjef/gomarkdoc/logger" | ||
) | ||
|
||
func main() { | ||
// Create a renderer to output data | ||
out, err := gomarkdoc.NewRenderer() | ||
if err != nil { | ||
// handle error | ||
} | ||
|
||
wd, err := os.Getwd() | ||
if err != nil { | ||
// handle error | ||
} | ||
|
||
packagePath := filepath.Join(wd, "../../v3/pkg/application") | ||
|
||
buildPkg, err := build.ImportDir(packagePath, build.ImportComment) | ||
if err != nil { | ||
// handle error | ||
} | ||
|
||
// Create a documentation package from the build representation of our | ||
// package. | ||
log := logger.New(logger.DebugLevel) | ||
pkg, err := lang.NewPackageFromBuild(log, buildPkg) | ||
if err != nil { | ||
// handle error | ||
panic(err) | ||
} | ||
|
||
// Write the documentation out to console. | ||
data, err := out.Package(pkg) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
cwd, err := os.Getwd() | ||
if err != nil { | ||
panic(err) | ||
} | ||
println(cwd) | ||
|
||
err = os.WriteFile(filepath.Join("..", "docs", "API", "fullapi.md"), []byte(data), 0644) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module generate | ||
|
||
go 1.21 | ||
|
||
require github.com/princjef/gomarkdoc v1.1.0 | ||
|
||
require ( | ||
github.com/Microsoft/go-winio v0.5.0 // indirect | ||
github.com/VividCortex/ewma v1.2.0 // indirect | ||
github.com/cheggaaa/pb/v3 v3.0.8 // indirect | ||
github.com/emirpasic/gods v1.12.0 // indirect | ||
github.com/fatih/color v1.11.0 // indirect | ||
github.com/go-git/gcfg v1.5.0 // indirect | ||
github.com/go-git/go-billy/v5 v5.3.1 // indirect | ||
github.com/go-git/go-git/v5 v5.3.0 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect | ||
github.com/kevinburke/ssh_config v1.1.0 // indirect | ||
github.com/mattn/go-colorable v0.1.8 // indirect | ||
github.com/mattn/go-isatty v0.0.12 // indirect | ||
github.com/mattn/go-runewidth v0.0.12 // indirect | ||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/nxadm/tail v1.4.8 // indirect | ||
github.com/princjef/mageutil v1.0.0 // indirect | ||
github.com/rivo/uniseg v0.2.0 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/sergi/go-diff v1.3.1 // indirect | ||
github.com/sirupsen/logrus v1.8.1 // indirect | ||
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect | ||
github.com/xanzy/ssh-agent v0.3.0 // indirect | ||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect | ||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect | ||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect | ||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect | ||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect | ||
gopkg.in/warnings.v0 v0.1.2 // indirect | ||
mvdan.cc/xurls/v2 v2.2.0 // indirect | ||
) |
Oops, something went wrong.