Golang:如何禁用自动标记排序?

With flag package, we can specify some command line parameters like this:

import "flag"
fun main() {
    from := flag.String("from", "", "the path to be copied")
    to := flag.String("to", "", "where the data copied to")
    ldb := flag.String("db", "./ldb", "the database path used during copy")
    pwd := flag.String("pwd", "", "password to encrypt your data, default no encryption on your data"
    flag.Parse()
    ...
}

When use -h for help, the printed message seems not the order I provided:

-db string
    the database path used during copy (default "./ldb")
-from string
    the path to be copied
-pwd string
    password to encrypt your data, default no encryption on your data
-to string
    where the data copy to

the order not intuitive, is there other options to tell Golang: Don't sort my parameter's automatically! ?

The output is lexically sorted (https://golang.org/pkg/flag/#VisitAll):

VisitAll visits the command-line flags in lexicographical order, calling fn for each. It visits all flags, even those not set.

See: https://golang.org/src/flag/flag.go#L435

You could use a flag.FlagSet and use a custom Usage func().