transform

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 6 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package transform provides value and string conversion helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

Capitalize uppercases the first byte of s and leaves the rest unchanged.

func CleanJoin

func CleanJoin(sep string, parts ...string) string

CleanJoin joins the non-empty parts with sep.

func ParseAsString

func ParseAsString(value any) string

ParseAsString returns an empty string for nil, otherwise the formatted value.

func ParseJson

func ParseJson(data interface{}) string

ParseJson returns data as indented JSON or the marshal error message.

func ParseYaml

func ParseYaml(data interface{}) (out string)

ParseYaml returns data as YAML indented with two spaces or the marshal error message.

func StringBool

func StringBool(value string) bool

StringBool reports whether value is one of the accepted true strings.

func Uppercase

func Uppercase(s string) string

Uppercase converts s to uppercase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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