GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - C0DE8/bmfmt: Golang [b]eautify [m]ap display [fmt] for Humans

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bmfmt.go
bmfmt.go
 
 
bmfmt_test.go
bmfmt_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

bmfmt Golang [b]eautify [m]ap display [fmt] for Humans

MIT license Maintenance Github all releases Build Status

Install

# stable version
go get -u -v gopkg.in/c0de8/bmfmt.v0

# latest version (may be unstable)
go get -u -v github.com/c0de8/bmfmt

Supported Structures

  • map[string]string
  • map[string][]string

More structures are in implementation.

Usage

API Documentation

Examples

package main

import (
	"fmt"
	bmfmt "github.com/c0de8/bmfmt"
)

func main() {
	example()
}

func example() {

	m := map[string][]string{
		"some-key": { "response" },
		"Another-Hash-Key": { "first value", "second value" },
	}

	fmt.Println(m) // fmt the default formatting
	/*
         map[some-key:[response] Another-Hash-Key:[first value second value]]
	*/

	err := bmfmt.Beautify(m) // significant more friendly formatting
	if err != nil {
		fmt.Println("ERROR (bmfmt.Beautify): " + err.Error())
	}
	/*
         [ "some-key"          string(  8) ]: "response"                     string(  8)
         [ "Another-Hash-Key"  string( 16) ]: "first value", "second value"  string( 23)
	*/

}

License

bmfmt is licensed under the MIT License. See LICENSE for the full license text.

About

Golang [b]eautify [m]ap display [fmt] for Humans

Topics

beautifierfmtfor-humansformaterformattergogo-langgo-librarygolanghumansprettifierpretty

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.