Copyright (c) 2015, Emir Pasic. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Package utils provides common utility functions. Provided functionalities: - sorting - comparators
package utils

import (
	
	
)
ToString converts a value to string.
func ( interface{}) string {
	switch .(type) {
	case string:
		return .(string)
	case int8:
		return strconv.FormatInt(int64(.(int8)), 10)
	case int16:
		return strconv.FormatInt(int64(.(int16)), 10)
	case int32:
		return strconv.FormatInt(int64(.(int32)), 10)
	case int64:
		return strconv.FormatInt(int64(.(int64)), 10)
	case uint8:
		return strconv.FormatUint(uint64(.(uint8)), 10)
	case uint16:
		return strconv.FormatUint(uint64(.(uint16)), 10)
	case uint32:
		return strconv.FormatUint(uint64(.(uint32)), 10)
	case uint64:
		return strconv.FormatUint(uint64(.(uint64)), 10)
	case float32:
		return strconv.FormatFloat(float64(.(float32)), 'g', -1, 64)
	case float64:
		return strconv.FormatFloat(float64(.(float64)), 'g', -1, 64)
	case bool:
		return strconv.FormatBool(.(bool))
	default:
		return fmt.Sprintf("%+v", )
	}