dsconfig

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLanguage

func AddLanguage(lang string, create_template_from_base, create_empty_template bool) error

Add new documentation language

func CreateEmptyTemplate

func CreateEmptyTemplate(dir_path, lang string, plangs []string, doctype DocType) error

Create an emty template of type `doctype` for the specified `lang` and `plangs`

func CreateTemplateFromBase

func CreateTemplateFromBase(baseLang, lang string, doctype DocType) error

Create template for the specified `lang` and `plangs` using <base>/docs<doctype> as reference

func NewConfig

func NewConfig(dir_path, base string, plangs []string, format FormatConfig, create_template bool) error

Create new docsync `Config` and write it to the file

func SyncLanguage

func SyncLanguage(lang string) error

Types

type Config

type Config struct {
	// Primary documentation language
	Base string `yaml:"base"`

	// List of all documentations
	Langs []string `yaml:"langs"`

	// Programming languages, used in the project
	PLangs []string `yaml:"plangs"`

	// The documentation formatting rules
	Format FormatConfig `yaml:"format"`
}

The main docsync configuration

type DocType

type DocType string
const (
	MD DocType = ".md"
)

type FormatConfig

type FormatConfig struct {
	// Primary markup language for documentation
	MainDocType DocType `yaml:"main_dtype"`

	// Config for markdown
	Markdown MarkdownConfig `yaml:"md"`
}

Formatting settings for different markup languages

func NewFormatConfig

func NewFormatConfig(md MarkdownConfig) FormatConfig

Create new `FormatConfig`

type MarkdownConfig

type MarkdownConfig struct{}

Configuration settings for markdown documentation

func NewMarkdownConfig

func NewMarkdownConfig() MarkdownConfig

Create new `MarkdownConfig`

Jump to

Keyboard shortcuts

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