Issue 1:
What version of Go are you using (go version)?

>go version
go version go1.6 windows/amd64

What operating system and processor architecture are you using (go env)?

>go env
set GOARCH=amd64
set GOBIN=C:\Users\<user>\Development\GoSource\bin
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\<user>\Development\GoSource
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GO15VENDOREXPERIMENT=1
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

What did you do?

The documentation gives an example on the expected behaviour of path.Base(), however, it does not actually split the trailing path element. Also, path.Base() duplicates the \ in the path.

package main

import (
"fmt"
"path"
"strings"
)

func main() {
base := `c:\users\username`
fmt.Println(path.Base(base))
fmt.Println(fmt.Sprintf("%q\n", strings.SplitAfter(base, `\`)))
lines := strings.SplitAfter(base, `\`)
fmt.Println(lines[len(lines)-1])
}

What did you expect to see?

The expected behaviour should be consistent with the documentation examples; path.Base() should return the trailing path element.

What did you see instead?

path.Base() returns the full path instead of the final path element.

Issue 2:
by steve.wangbin:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
My program is too large to post here. the relavent function is below:
line 58: func (p *channelChatCase) prepare(account string, pos *position) (player
*gameserver.Player, err error) {
line 59: player, err = gameserver.Login(&p.env.Param, account, p.env.Password,
"")
line 60: if err != nil {
line 61: return nil, err
line 62: }
line 63: defer func() {
line 64: if err != nil {
line 65: player.Close()
line 66: }
line 67: }()
line 68: if err := player.WaitChannel(p.channeltype); err != nil {
line 69: return nil, err
line 70: }
line 71: if err := player.NewWorld(pos.mapid, pos.x, pos.y); err != nil {
line 72: return nil, err
line 73: }
line 74: return player, nil
line 75: }

This function returned at line 68 and caused a panic, but the stack trace told me that
the line number where the function returns is 61.

What is the expected output?
main._func_002(0x261af0, 0x261ae8, 0xf8400009f0, 0xf840207000)
D:/svnroot/devtool/robot/case_channelchat.go:65 +0x36
main.(*channelChatCase).prepare(0xf840217600, 0xf84006c0a9, 0x8, 0xf840217620, 0x0, ...)
D:/svnroot/devtool/robot/case_channelchat.go:69 +0xf4

What do you see instead?
main._func_002(0x261af0, 0x261ae8, 0xf8400009f0, 0xf840207000)
D:/svnroot/devtool/robot/case_channelchat.go:65 +0x36
main.(*channelChatCase).prepare(0xf840217600, 0xf84006c0a9, 0x8, 0xf840217620, 0x0, ...)
D:/svnroot/devtool/robot/case_channelchat.go:61 +0xf4

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
windows7 64bit

Which version are you using? (run 'go version')
go 1.0.3

Please provide any additional information below.