Categorygithub.com/gobs/pretty
modulepackage
0.0.0-20180724170744-09732c25a95b
Repository: https://github.com/gobs/pretty.git
Documentation: pkg.go.dev

# README

pretty

A Pretty-printer for Go data structures

Installation

$ go get github.com/gobs/pretty

Documentation

http://godoc.org/github.com/gobs/pretty

Example

package main

import "github.com/gobs/pretty"

func main() {
    stuff := map[string]interface{} {
      "a": 1,
      "b": "due",
      "c": []int { 1, 2, 3 },
      "d": false,
    }

    pretty.PrettyPrint(stuff)
}

# Functions

create a TabPrinter max specifies the maximum number of 'words' per line.
pretty print the input value (to a string).
pretty print the input value (to stdout).
pretty print the input value (to specified writer).

# Constants

No description provided by the author
No description provided by the author

# Structs

The context for printing.
A TabPrinter is an object that allows printing tab-aligned words on multiple lines, up to a maximum number per line.