docs: improve documentation for private functions

This commit is contained in:
Reinaldy Rafli 2021-10-28 00:26:48 +07:00
parent 096b6b46d4
commit 058137622a
No known key found for this signature in database
GPG Key ID: CFDB9400255D8CB6
2 changed files with 9 additions and 153 deletions

152
.github/codegen.js vendored
View File

@ -3,6 +3,8 @@
*/ */
const fs = require('fs/promises'); const fs = require('fs/promises');
// If you used this codegen, don't forget to reset
// the letters array just to be a single value.
const letters = const letters =
[ [
` `
@ -11,156 +13,6 @@ const letters =
| (_| | | (_| |
\\__,_| \\__,_|
`, `,
` _
| |__
| '_ \\
| |_) |
|_.__/
`,
`
___
/ __|
| (__
\\___|
`,
` _
__| |
/ _ |
| (_| |
\\__,_|
`,
`
___
/ _ \\
| __/
\\___|
`,
` __
/ _|
| |_
| _|
|_|
`,
`
__ _
/ _\` |
| (_| |
\\__, |
|___/ `,
` _
| |__
| '_ \\
| | | |
|_| |_|
`,
` _
(_)
| |
| |
|_|
`,
` _
(_)
| |
| |
_/ |
|__/ `,
` _
| | __
| |/ /
| <
|_|\\_\\
`,
` _
| |
| |
| |
|_|
`,
`
_ __ ___
| '_ \` _ \\
| | | | | |
|_| |_| |_|
`,
`
_ __
| '_ \
| | | |
|_| |_|
`,
`
___
/ _ \
| (_) |
\___/
`,
`
_ __
| '_ \
| |_) |
| .__/
|_| `,
`
__ _
/ _\` |
| (_| |
\\__, |
|_|`,
`
_ __
| '__|
| |
|_|
`,
`
___
/ __|
\\__ \\
|___/
`,
` _
| |_
| __|
| |_
\\__|
`,
`
_ _
| | | |
| |_| |
\\__,_|
`,
`
__ __
\\ \\ / /
\\ V /
\\_/
`,
`
__ __
\\ \\ /\\ / /
\\ V V /
\\_/\\_/
`,
`
__ __
\\ \\/ /
> <
/_/\\_\\
`,
`
_ _
| | | |
| |_| |
\\__, |
|___/ `,
`
____
|_ /
/ /
/___|
`,
] ]
;(async () => { ;(async () => {

View File

@ -1,4 +1,6 @@
// ASCIITXT is a simple utility for creating ascii texts. // ASCIITXT is a simple utility for creating ASCII texts.
// The text that can be created is limited to a certain input as the maintainers
// have to input all the text manually.
package asciitxt package asciitxt
import ( import (
@ -61,7 +63,7 @@ func WithConfig(txt string, config Config) string {
return output.String() return output.String()
} }
// // Get a depth (vertical) length for a certain style.
func getStyleLength(style Style) int { func getStyleLength(style Style) int {
switch style { switch style {
case StyleStandard: case StyleStandard:
@ -71,6 +73,8 @@ func getStyleLength(style Style) int {
} }
} }
// Get a letter by a certain style.
// It returns a panic if the style input is invalid.
func getStyleLetter(style Style, letter string) []string { func getStyleLetter(style Style, letter string) []string {
switch style { switch style {
case StyleStandard: case StyleStandard: