docsrc

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

@snippet_begin(HelloWorldSample)

Index

Constants

This section is empty.

Variables

View Source
var Assets embed.FS
View Source
var BootUpDevSample = string([]byte{0x66, 0x75, 0x6e, 0x63, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0xa, 0x9, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3a, 0x3d, 0x20, 0x6f, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x65, 0x6e, 0x76, 0x28, 0x22, 0x50, 0x4f, 0x52, 0x54, 0x22, 0x29, 0xa, 0x9, 0x69, 0x66, 0x20, 0x6c, 0x65, 0x6e, 0x28, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x20, 0x7b, 0xa, 0x9, 0x9, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x38, 0x38, 0x30, 0x30, 0x22, 0xa, 0x9, 0x7d, 0xa, 0x9, 0x66, 0x6d, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x6c, 0x6e, 0x28, 0x22, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x6f, 0x63, 0x73, 0x20, 0x61, 0x74, 0x20, 0x3a, 0x22, 0x20, 0x2b, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0xa, 0x9, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x28, 0x22, 0x2f, 0x22, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x67, 0x6f, 0x2e, 0x4e, 0x65, 0x77, 0x28, 0x29, 0x2e, 0xa, 0x9, 0x9, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x64, 0x6f, 0x63, 0x67, 0x6f, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x2e, 0xa, 0x9, 0x9, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x28, 0x22, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x22, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x73, 0x72, 0x63, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x29, 0x2e, 0xa, 0x9, 0x9, 0x44, 0x6f, 0x63, 0x54, 0x72, 0x65, 0x65, 0x28, 0x64, 0x6f, 0x63, 0x73, 0x72, 0x63, 0x2e, 0x44, 0x6f, 0x63, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x2e, 0x2e, 0x29, 0x2e, 0xa, 0x9, 0x9, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x29, 0x2c, 0xa, 0x9, 0x29, 0xa, 0x9, 0x65, 0x72, 0x72, 0x20, 0x3a, 0x3d, 0x20, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x28, 0x22, 0x3a, 0x22, 0x2b, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6e, 0x69, 0x6c, 0x29, 0xa, 0x9, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x7b, 0xa, 0x9, 0x9, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x28, 0x65, 0x72, 0x72, 0x29, 0xa, 0x9, 0x7d, 0xa, 0x7d, 0xa})
View Source
var DocTree = []interface{}{
	Home,
	UseWithHtmlGo,
	GithubPagesIntegration,
	MarkdownDifference,
	&docgo.DocsGroup{
		Title: "Samples",
		Docs: []*docgo.DocBuilder{
			HelloWorld,
		},
	},
}
View Source
var GithubPagesIntegration = Doc(

	Markdown(`
## Github Pages Setting

By default ~./dev.sh~ will automatically run ~go run ./build/main.go~ which will generate static html pages along with js and css, assets files into a directory ~docs~ in your repo's root directory.

This way you can go to Github Settings -> Pages to turn on the settings like this:

![](assets/github_pages_setting.png)

And commit the ~docs~ directory into your main branch to publish your doc to github.

`),
).Title("Github Pages Integration")
View Source
var HelloWorld = Doc(
	Markdown(`
## Overview

Write some beautiful docs
`),
	Tip("This is quite important to learn"),

	H2("A new section"),
	P(Text("Doc of that section")),
	ch.Code("var Hello = 123").Language("go"),
).
	Title("Hello World").
	AbstractText(
		"Hello world doc to describe how easy it is to create a doc",
	)
View Source
var HelloWorldSample = string([]byte{0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x73, 0x72, 0x63, 0xa, 0xa, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x28, 0xa, 0x9, 0x2e, 0x20, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x64, 0x6f, 0x63, 0x67, 0x6f, 0x22, 0xa, 0x9, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x64, 0x6f, 0x63, 0x67, 0x6f, 0x2f, 0x63, 0x68, 0x22, 0xa, 0x9, 0x2e, 0x20, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x67, 0x6f, 0x22, 0xa, 0x29, 0xa, 0xa, 0x76, 0x61, 0x72, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0xa, 0x9, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x28, 0x60, 0xa, 0x23, 0x23, 0x20, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0xa, 0xa, 0x57, 0x72, 0x69, 0x74, 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x62, 0x65, 0x61, 0x75, 0x74, 0x69, 0x66, 0x75, 0x6c, 0x20, 0x64, 0x6f, 0x63, 0x73, 0xa, 0x60, 0x29, 0x2c, 0xa, 0x9, 0x54, 0x69, 0x70, 0x28, 0x22, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x71, 0x75, 0x69, 0x74, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x22, 0x29, 0x2c, 0xa, 0xa, 0x9, 0x48, 0x32, 0x28, 0x22, 0x41, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x50, 0x28, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x44, 0x6f, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x29, 0x2c, 0xa, 0x9, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x22, 0x76, 0x61, 0x72, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x3d, 0x20, 0x31, 0x32, 0x33, 0x22, 0x29, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x28, 0x22, 0x67, 0x6f, 0x22, 0x29, 0x2c, 0xa, 0x29, 0x2e, 0xa, 0x9, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x22, 0x29, 0x2e, 0xa, 0x9, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x65, 0x78, 0x74, 0x28, 0xa, 0x9, 0x9, 0x22, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x64, 0x6f, 0x63, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x65, 0x61, 0x73, 0x79, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x64, 0x6f, 0x63, 0x22, 0x2c, 0xa, 0x9, 0x29, 0xa})
View Source
var HelloWorldWithChildren = Doc(
	Markdown(`
## Overview

Write some beautiful docs
`),
).Title("Hello World with children").
	AbstractText("Hello world with children is to describe how to add children docs")

@snippet_begin(HelloWorldWithChildrenSample)

View Source
var HelloWorldWithChildrenSample = string([]byte{0x76, 0x61, 0x72, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x57, 0x69, 0x74, 0x68, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0xa, 0x9, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x28, 0x60, 0xa, 0x23, 0x23, 0x20, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0xa, 0xa, 0x57, 0x72, 0x69, 0x74, 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x62, 0x65, 0x61, 0x75, 0x74, 0x69, 0x66, 0x75, 0x6c, 0x20, 0x64, 0x6f, 0x63, 0x73, 0xa, 0x60, 0x29, 0x2c, 0xa, 0x29, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x29, 0x2e, 0xa, 0x9, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x20, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x20, 0x64, 0x6f, 0x63, 0x73, 0x22, 0x29, 0xa, 0xa, 0x76, 0x61, 0x72, 0x20, 0x48, 0x6f, 0x77, 0x54, 0x6f, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x28, 0x60, 0xa, 0x23, 0x23, 0x20, 0x53, 0x61, 0x79, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0xa, 0xa, 0x48, 0x69, 0x2c, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0xa, 0xa, 0x7e, 0x7e, 0x7e, 0x67, 0x6f, 0xa, 0x76, 0x61, 0x72, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x7e, 0x7e, 0x7e, 0xa, 0xa, 0x60, 0x29, 0x29, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x48, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x79, 0x20, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x29, 0xa, 0xa, 0x76, 0x61, 0x72, 0x20, 0x48, 0x6f, 0x77, 0x54, 0x6f, 0x47, 0x6f, 0x6f, 0x64, 0x42, 0x79, 0x65, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x28, 0x60, 0xa, 0x23, 0x23, 0x20, 0x53, 0x61, 0x79, 0x20, 0x47, 0x6f, 0x6f, 0x64, 0x20, 0x42, 0x79, 0x65, 0xa, 0xa, 0x42, 0x79, 0x65, 0x2c, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0xa, 0xa, 0x60, 0x29, 0x29, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x48, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x79, 0x20, 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x62, 0x79, 0x65, 0x22, 0x29, 0xa})
View Source
var Home = Doc(

	Markdown(`
## Why use docgo

The developer community often use markdown or in Python world use [Sphinx](https://www.sphinx-doc.org) and [reStructuredText](https://docutils.sourceforge.io/rst.html) to create tech documentations, We think they are nice, But because of these reasons we created this package for the Go community:

- Work together with [snippetgo](https://github.com/sunfmin/snippetgo) to use real executable code as example code blocks in documentation, So that it won't be invalid or obsolete after code change, Since Go compiler will pick out the errors and you will have to fix the examples to make compiler happy, and the documentation is automatically updated.
- Write documentation in Go code not only you can still write markdown, But also you can access the flexibility of a programming language, to use components, and reuse parts that are duplicated.
- Documents exists inside go code, means it can be distributed as go packages, so it wont' be restricted with directory layout.
- Make developer focus on writing documentation, instead of worrying about document styles.

`),
	H2("Getting Started"),
	Markdown(`
Run this script to install ~docgo~ binary

~~~
$ go install github.com/theplant/docgo/x/docgo@main 
~~~

Go to a go package that use go modules with ~go.mod~ in the directory. and run:

~~~
$ docgo
~~~

It will output something like this:

~~~
docsrc/assets/logo.png generated
docsrc/build/main.go generated
docsrc/dev/main.go generated
docsrc/dev.sh generated
docsrc/examples-generated.go generated
docsrc/home.go generated
Done

cd docsrc && ./dev.sh to start your doc
~~~

Run ~cd docsrc && ./dev.sh~ and access http://localhost:8800 to see generated first doc.

The ~./dev.sh~ script is using [entr](https://eradman.com/entrproject/) to do auto restart server after you edit any go file. So make sure to have that installed if you haven't

~~~
$ brew install entr
~~~

Then you can go back to the ~docsrc~ directory to edit and create go files to update docs.

`),
	P(
		Text("The following code is used to build this doc"),
		DocLink(HelloWorld),
	),
	ch.Code(HelloWorldSample).Language("go"),
	P(
		Markdown("Use the following code to boot up your doc app, Suppose you have already created a `Home` Doc in docsrc package."),
		ch.Code(BootUpDevSample).Language("go"),
	),
).Title("Introduction").
	Slug("/").
	AbstractText(`Write documentation with go code in a declarative way to create beautiful documentation`)
View Source
var HowToGoodBye = Doc(Markdown(`
## Say Good Bye

Bye, There

`)).Title("How to say good bye")
View Source
var HowToSayHello = Doc(Markdown(`
## Say Hello

Hi, There

~~~go
var Hello = true
~~~

`)).Title("How to say hello")
View Source
var HowToSayHelloWithCodeBlock = Doc(Markdown(`
## Say Hello

Hi, There

~~~
var Hello = true
~~~

`)).Title("How to say hello with code block")

@snippet_begin(HowToSayHelloWithCodeBlockSample)

View Source
var HowToSayHelloWithCodeBlockSample = string([]byte{0x76, 0x61, 0x72, 0x20, 0x48, 0x6f, 0x77, 0x54, 0x6f, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x28, 0x60, 0xa, 0x23, 0x23, 0x20, 0x53, 0x61, 0x79, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0xa, 0xa, 0x48, 0x69, 0x2c, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0xa, 0xa, 0x7e, 0x7e, 0x7e, 0xa, 0x76, 0x61, 0x72, 0x20, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x7e, 0x7e, 0x7e, 0xa, 0xa, 0x60, 0x29, 0x29, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x48, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x79, 0x20, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x29, 0xa})
View Source
var MarkdownDifference = Doc(

	H2("Be aware the Go source code limitations"),

	P(
		Text("Since it's not possible to write"),
		Code("`"),
		Text("if you are writing inside a"),
		A().Text("go raw string literals").Href("https://golang.org/ref/spec#String_literals"),
		Text("which normally used to pass in "),
		Code("Markdown"),
		Text("func, So we have to replace it with"),
		Code("~"),
	),
	ch.Code(HowToSayHelloWithCodeBlockSample).Language("go"),
).Title("Markdown difference")
View Source
var MarkdownDifferenceSample = string([]byte{0x76, 0x61, 0x72, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x5b, 0x5d, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x7b, 0xa, 0x9, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa, 0x7d, 0x7b, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x22, 0x31, 0x32, 0x33, 0x22, 0x7d, 0x7d, 0xa, 0xa, 0x76, 0x61, 0x72, 0x20, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x44, 0x6f, 0x63, 0x28, 0xa, 0xa, 0x9, 0x48, 0x32, 0x28, 0x22, 0x42, 0x65, 0x20, 0x61, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x6f, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x29, 0x2c, 0xa, 0xa, 0x9, 0x50, 0x28, 0xa, 0x9, 0x9, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x22, 0x60, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, 0x61, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x41, 0x28, 0x29, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x67, 0x6f, 0x20, 0x72, 0x61, 0x77, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x22, 0x29, 0x2e, 0x48, 0x72, 0x65, 0x66, 0x28, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x65, 0x66, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x23, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x73, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x22, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x54, 0x65, 0x78, 0x74, 0x28, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x2c, 0x20, 0x53, 0x6f, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x9, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x22, 0x7e, 0x22, 0x29, 0x2c, 0xa, 0x9, 0x29, 0x2c, 0xa, 0x9, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x48, 0x6f, 0x77, 0x54, 0x6f, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x29, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x28, 0x22, 0x67, 0x6f, 0x22, 0x29, 0x2c, 0xa, 0x29, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x22, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x29, 0xa})
View Source
var MyHelloWorldSample = string([]byte{0x66, 0x75, 0x6e, 0x63, 0x20, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x28, 0x29, 0x20, 0x7b, 0xa, 0x9, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x6c, 0x6e, 0x28, 0x22, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x22, 0x29, 0xa, 0x7d, 0xa})
View Source
var UseWithHtmlGo = Doc(
	Markdown(`
## Use any html

Use together with [htmlgo](https://github.com/htmlgo), basically means you can write any html you like inside your doc, This gives you a whole lot of flexibility when writing documentation.

Take a look at this example:
`),
	ch.Code(MarkdownDifferenceSample),
).Title("Use with htmlgo").
	AbstractText("The ability to use any html code inside your documentation is pretty good")

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL