stringobj

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stringobj aids in writing String methods for objects with a JSON-like output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder helps build String functions for objects that skip zero-value attributes.

func (*Builder) Put

func (b *Builder) Put(name string, value interface{})

Put adds the given attribute-value pair to the builder, skipping it if the value is a zero value.

func (*Builder) String

func (b *Builder) String() string

String returns the final string representation.

Jump to

Keyboard shortcuts

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