/KSortMap-go

Primary LanguageGoGNU Lesser General Public License v3.0LGPL-3.0

KSortMap - a package for sorting the map by keys

Install

go get github.com/KoNekoD/KSortMap-go/cmd/KSortMap

Usage

package main

import (
	"fmt"
	"github.com/KoNekoD/KSortMap-go/cmd/KSortMap"
)

func main() {
	fmt.Println(KSortMap.Sort(map[string]int{"CCC": 1, "BBB": 2, "AAA": 3}))

	fmt.Println(KSortMap.Sort(map[int]string{3: "AAA", 1: "BBB", 2: "CCC"}))
}