summary

package
v0.0.0-...-ede35a2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	strings.Builder
	// contains filtered or unexported fields
}

Builder is used to build multiline summaries.

func (*Builder) Add

func (s *Builder) Add(format string, a ...interface{})

Add starts a new line and prints the given string as its value.

func (*Builder) Ascend

func (s *Builder) Ascend()

Ascend descreases the current indent level. It panics if the indent level becomes negative.

func (*Builder) Descend

func (s *Builder) Descend()

Descend increases the current indent level.

func (*Builder) Printf

func (s *Builder) Printf(format string, a ...interface{})

Printf prints the given string to the summarizer in the same manner as fmt.Printf.

func (*Builder) StartLine

func (s *Builder) StartLine()

StartLine starts a new line and writes the current indent to the summary.

type Interface

type Interface interface {
	Add(format string, a ...interface{})
	Descend()
	Ascend()
}

Interface is an interface for summarizing configuration.

Jump to

Keyboard shortcuts

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