}
}
-// Get the current goroutine id. Used only for debugging.
+// GetGID the current goroutine id. Used only for debugging.
func GetGID() uint64 {
b := make([]byte, 64)
b = b[:runtime.Stack(b, false)]
type FileError interface {
error
- // ErroContext holds some context information about the error.
+ // ErrorContext holds some context information about the error.
ErrorContext() *ErrorContext
text.Positioner
return v
}
-// Set overwrites values in dst with values in src for common or new keys.
+// SetParams overwrites values in dst with values in src for common or new keys.
// This is done recursively.
func SetParams(dst, src Params) {
for k, v := range src {
dst.merge(ParamsMergeStrategy(strategy), src)
}
-// MergeParamsWithStrategy transfers values from src to dst for new keys using the merge encoded in dst.
+// MergeParams transfers values from src to dst for new keys using the merge encoded in dst.
// This is done recursively.
func MergeParams(dst, src Params) {
ms, _ := dst.GetMergeStrategy()
return Whitelist{patterns: patternsr, patternsStrings: patternsStrings}
}
-// Accepted reports whether name is whitelisted.
+// Accept reports whether name is whitelisted.
func (w Whitelist) Accept(name string) bool {
if w.acceptNone {
return false
quit chan struct{}
}
-// SendErr sends the error on a channel to be handled later.
+// SendError sends the error on a channel to be handled later.
// This can be used in situations where returning and aborting the current
// operation isn't practical.
func (e *globalErrHandler) SendError(err error) {
return result
}
-// UniqueStringsReuse returns a sorted slice with any duplicates removed.
+// UniqueStringsSorted returns a sorted slice with any duplicates removed.
// It will modify the input slice.
func UniqueStringsSorted(s []string) []string {
if len(s) == 0 {
return newFs(fs, fs, workingDir, publishDir)
}
-// NewFrom creates a new Fs based on the provided Afero Fss
+// NewFromSourceAndDestination creates a new Fs based on the provided Afero Fss
// as the source and destination file systems.
func NewFromSourceAndDestination(source, destination afero.Fs, cfg config.Provider) *Fs {
workingDir, publishDir := getWorkingPublishDir(cfg)
return counter, fs.RemoveAll(dir)
}
-// HasOsFs returns whether fs is an OsFs or if it fs wraps an OsFs.
+// IsOsFs returns whether fs is an OsFs or if it fs wraps an OsFs.
// TODO(bep) make this nore robust.
func IsOsFs(fs afero.Fs) bool {
var isOsFs bool
UnwrapFilesystems() []afero.Fs
}
-// FilesystemsProvider returns the underlying filesystem.
+// FilesystemUnwrapper returns the underlying filesystem.
type FilesystemUnwrapper interface {
UnwrapFilesystem() afero.Fs
}
return p == pp
}
-// GetIdentify is for internal use.
+// GetIdentity is for internal use.
func (p *pageState) GetIdentity() identity.Identity {
return identity.NewPathIdentity(files.ComponentFolderContent, filepath.FromSlash(p.Pathc()))
}
return c.allPages.get()
}
-// AllPages returns all regular pages for all languages.
+// AllRegularPages returns all regular pages for all languages.
func (c *PageCollections) AllRegularPages() page.Pages {
return c.allRegularPages.get()
}
"sync/atomic"
)
-// NewIdentityManager creates a new Manager starting at id.
+// NewManager creates a new Manager starting at id.
func NewManager(id Provider) Manager {
return &identityManager{
Provider: id,
return nil
}
-// Clone sets the language func for the new language.
+// CloneResource sets the language func for the new language.
func (tp *TranslationProvider) CloneResource(dst, src *deps.Deps) error {
dst.Translate = tp.t.Func(dst.Conf.Language().Lang)
return nil
return ini.add(true, initFn)
}
-// BranchdWithTimeout is same as Branch, but with a timeout.
+// BranchWithTimeout is same as Branch, but with a timeout.
func (ini *Init) BranchWithTimeout(timeout time.Duration, f func(ctx context.Context) (any, error)) *Init {
return ini.Branch(func(ctx context.Context) (any, error) {
return ini.withTimeout(ctx, timeout, f)
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package asciidoc_config holds asciidoc related configuration.
+// Package asciidocext_config holds asciidoc related configuration.
package asciidocext_config
var (
// HeadingRenderer describes a uniquely identifiable rendering hook.
type HeadingRenderer interface {
- // Render writes the rendered content to w using the data in w.
+ // RenderHeading writes the rendered content to w using the data in w.
RenderHeading(cctx context.Context, w io.Writer, ctx HeadingContext) error
identity.Provider
}
"github.com/yuin/goldmark/text"
)
-// Kind is the kind of an Hugo code block.
+// KindCodeBlock is the kind of an Hugo code block.
var KindCodeBlock = ast.NewNodeKind("HugoCodeBlock")
// Its raw contents are the plain text of the code block.
AutoHeadingIDTypeBlackfriday = "blackfriday"
)
-// DefaultConfig holds the default Goldmark configuration.
+// Default holds the default Goldmark configuration.
var Default = Config{
Extensions: Extensions{
Typographer: Typographer{
var id = identity.NewPathIdentity("chroma", "highlight")
-// GetIdentify is for internal use.
+// GetIdentity is for internal use.
func (h chromaHighlighter) GetIdentity() identity.Identity {
return id
}
}
}
-// Render writes the attributes to the given as attributes to an HTML element.
+// RenderAttributes Render writes the attributes to the given as attributes to an HTML element.
// This is used for the default codeblock rendering.
// This performs HTML escaping of string attributes.
func RenderAttributes(w hugio.FlexiWriter, skipClass bool, attributes ...Attribute) {
toc *Fragments
}
-// Add adds the heading to the ToC.
+// AddAt adds the heading to the ToC.
func (b *Builder) AddAt(h *Heading, row, level int) {
if b.toc == nil {
b.toc = &Fragments{}
// Used in change/dependency tracking.
identity.Provider
- // Headings returns the headings for this page when a filter is set.
+ // HeadingsFiltered returns the headings for this page when a filter is set.
// This is currently only triggered with the Related content feature
// and the "fragments" type of index.
HeadingsFiltered(context.Context) tableofcontents.Headings
// RelRef returns a relative URL to a page.
RelRef(argsm map[string]any) (string, error)
- // RefFrom is for internal use only.
+ // RelRefFrom is for internal use only.
RelRefFrom(argsm map[string]any, source any) (string, error)
}
// For internal use only.
GetPageWithTemplateInfo(info tpl.Info, ref ...string) (Page, error)
- // BuildDraft is deprecated and will be removed in a future release.
+ // BuildDrafts is deprecated and will be removed in a future release.
BuildDrafts() bool
- // IsMultilingual reports whether this site is configured with more than one language.
+ // IsMultiLingual reports whether this site is configured with more than one language.
IsMultiLingual() bool
- // LanguagePrefi returns the language prefix for this site.
+ // LanguagePrefix returns the language prefix for this site.
LanguagePrefix() string
}
}
}
-// postPublishResource holds a Resource to be transformed post publishing.
+// PostPublishResource holds a Resource to be transformed post publishing.
type PostPublishResource struct {
prefix string
delegate resource.Resource
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package godartsass integrates with the Dass Sass Embedded protocol to transpile
+// Package dartsass integrates with the Dass Sass Embedded protocol to transpile
// SCSS/SASS.
package dartsass
return true
}
-// Lt returns the boolean truth of arg1 < arg2 && arg1 < arg3 && arg1 < arg4.
+// LtCollate returns the boolean truth of arg1 < arg2 && arg1 < arg3 && arg1 < arg4.
// The provided collator will be used for string comparisons.
// This is for internal use.
func (n *Namespace) LtCollate(collator *langs.Collator, first any, others ...any) bool {