formatters

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatJSON

func FormatJSON(data string) string

FormatJSON takes a string and returns a formatted JSON string if the string passed is a valid JSON string

Types

type Formatter

type Formatter interface {
	Format(data string) string
}

Formatter interface for passing types of formatters to workers

type JSONFormatter

type JSONFormatter struct{}

JSONFormatter implmentation of format

func (*JSONFormatter) Format

func (jf *JSONFormatter) Format(data string) string

Jump to

Keyboard shortcuts

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