func (f Frame) Format(s fmt.State, verb rune) {
	switch verb {
	case 'v':
		file, line := f.fileLine()
		if s.Flag('+') {
			io.WriteString(s, f.name())
			io.WriteString(s, "\n\t")
			io.WriteString(s, file)
		} else {
			io.WriteString(s, path.Base(file))
		}
		io.WriteString(s, ":")
		io.WriteString(s, strconv.Itoa(line))
	case 'n':
		io.WriteString(s, funcname(f.name()))
	default:
		panic("Frame.Format: unsupport verb - " + string(verb))
	}
}
Format formats the frame according to the fmt.Formatter interface.

%n    <funcname>
%v    <file>:<line>

Format accepts flags that alter the printing of some verbs, as follows:

%+v   equivalent to <funcname>\n\t<file>:<line>
package ts
import (
	"fmt"
	"io"
	"path"
	"runtime"
	"strconv"
	"strings"
)
type Frame uintptr
func (f Frame) pc() uintptr { return uintptr(f) - 1 }
func (f Frame) fileLine() (string, int) {
	fn := runtime.FuncForPC(f.pc())
	if fn == nil {
		return "unknown", 0
	}
	return fn.FileLine(f.pc())
}
func (f Frame) name() string {
	fn := runtime.FuncForPC(f.pc())
	if fn == nil {
		return "unknown"
	}
	return fn.Name()
}