[go-nuts] Is there a bug in path.Dir?

2016-06-19 Thread 18126523585
In windows platform, path.Dir and path.Base can't get the correct result. The test code is like this: func main() { filename := "F:\\Test\\conf\\rkc1" i := strings.LastIndex(filename, string(filepath.Separator)) fmt.Println("dir1:", string(filename[:i+1])) fmt.Println

[go-nuts] Re: Is there a bug in path.Dir?

2016-06-20 Thread 18126523585
Package "filepath" works well, but the "path" package is not recommended ? 在 2016年6月20日星期一 UTC+8下午1:40:55,徐新华写道: > > Package path implements utility routines for manipulating > slash-separated(/) paths. > > So, you should use "path/filepath" > -- You received this message because you are subscr

Re: [go-nuts] Re: Is there a bug in path.Dir?

2016-07-15 Thread 18126523585
OK, i get it 在 2016年6月21日星期二 UTC+8上午9:46:09,Ian Lance Taylor写道: > > On Mon, Jun 20, 2016 at 5:59 PM, <18126...@163.com > wrote: > > Package "filepath" works well, but the "path" package is not recommended > ? > > The path package is for slash-separated packages such as appear in URLs. > > The

[go-nuts] I get a "Invalid cast. " error when debuging

2016-07-15 Thread 18126523585
I using gdb for debugging, and set a variable new value , then failed. look this screen: (gdb) whatis tokenId type = struct string (gdb) set tokenId="ab" Invalid cast. (gdb) GO in gdb is not supported a memory value change? -- You received this message because you are subscribed to the Goog