实现数组倒序

package main

import (
    "fmt"
    "sort"
    "strings"
)

func main() {
    god := []string{"g", "o", "d"}
    sort.SliceStable(god, func(i, j int) bool { return i > j })
    fmt.Printf("god is %s", strings.Join(god,""))
}

output is : god is dog