comments

package
v0.0.0-...-a438c6f Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Text string
	markers.Options
}

Comment represents a comment with text and supported marker options.

func New

func New(text string, opts ...Option) (*Comment, error)

New returns a Comment by parsing Upjet markers as Options

func (*Comment) Build

func (c *Comment) Build() string

Build builds comments by adding comment prefix ("// ") to each line of the string representation of this Comment.

func (*Comment) CommentWithoutOptions

func (c *Comment) CommentWithoutOptions() *Comment

CommentWithoutOptions returns a new Comment without the Options.

func (*Comment) String

func (c *Comment) String() string

String returns a string representation of this Comment (no "// " prefix)

type Option

type Option func(*Comment)

Option is a comment option

func WithReferenceConfig

func WithReferenceConfig(cfg config.Reference) Option

WithReferenceConfig returns a comment options with the given reference config

func WithTFTag

func WithTFTag(s string) Option

WithTFTag returns a comment options with input tf tag

Jump to

Keyboard shortcuts

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