File: goofy_map.go

package info (click to toggle)
golang-github-clbanning-mxj 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,200 kB
  • sloc: xml: 176; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

import (
	"fmt"

	"github.com/clbanning/mxj/v2"
)

func main() {
	data := map[interface{}]interface{}{
		"hello": "out there",
		1:       "number one",
		3.12:    "pi",
		"five":  5,
	}

	m, err := mxj.AnyXmlIndent(data,"", "   ")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(string(m))
}