<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.go.general">
    <title>gmane.comp.lang.go.general</title>
    <link>http://blog.gmane.org/gmane.comp.lang.go.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96907"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96905"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96894"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96889"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96881"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96862"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96861"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96855"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96844"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96840"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96839"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96837"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96820"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96815"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96813"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96810"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96794"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96785"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96778"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.go.general/96775"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96907">
    <title>[go-nuts] Im carzy agent… bytes.Buffer : truncation out of range</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96907</link>
    <description>&lt;pre&gt;Download the attachment ， export to you go/src/ .  you need to run  cd  webgame/server/message &amp;amp;&amp;amp; go get   



cd  gameai   and go build  in the folder ,.

1. ./gameai &amp;amp;  

2.  go test -v  


after 100000 circulations  :


panic: bytes.Buffer: truncation out of range

goroutine 29 [running]:
bytes.(*Buffer).Truncate(0xc20069aee0, 0x02013/05/2)
/usr/local/go11/src/pkg/bytes/buffer.go:65 +0xc7
bytes.(*Buffer).Read(0xc20069aee0, 0xc2007267a2, 0x2, 0x6, 0x0, ...)
/usr/local/go11/src/pkg/bytes/buffer.go:255 +0x6c
io.ReadAtLeast(0xc2000fb1b0, 0xc20069aee0, 0xc2007267a0, 0x4, 0x8, ...)
/usr/local/go11/src/pkg/io/io.go:284 +0xf7
io.ReadFull(0xc2000fb1b0, 0xc20069aee0, 0xc2007267a0, 0x4, 0x8, ...)
/usr/local/go11/src/pkg/io/io.go:302 +0x6f
encoding/binary.Read(0xc2000fb1b0, 0xc20069aee0, 0xc200151c60, 0x3d, 0x217980, ...)
/usr/local/go11/src/pkg/encoding/binary/binary.go:136 +0xf2
webgame/server/gamelib.func·002(0xc20014ecb0, 0xc20014e955, 0x22, 0x3f)
/Users/gao/code/mygo/src/webgame/server/gamelib/server.go:37 +0x2ab
webgame/server/gamelib.(*ServerMex).connDataSplit(0xc2000bf9b0)
/Users/gao/code/mygo/src/webgame/server/gamelib/server.go:129 +0x40a
created by webgame/server/gamelib.(*ServerMex).RunServer
/Users/gao/code/mygo/src/webgame/server/gamelib/server.go:180 +0xa4

goroutine 1 [IO wait]:
net.runtime_pollWait(0x5fde60, 0x72, 0x0)
/usr/local/go11/src/pkg/runtime/znetpoll_darwin_amd64.c:118 +0x82
net.(*pollDesc).WaitRead(0xc2000d42c0, 0x23, 0xc2000fb690)
/usr/local/go11/src/pkg/net/fd_poll_runtime.go:75 +0x31
net.(*netFD).accept(0xc2000d4240, 0x38bc90, 0x0, 0xc2000fb690, 0x23, ...)
/usr/local/go11/src/pkg/net/fd_unix.go:385 +0x2c1
net.(*TCPListener).AcceptTCP(0xc200159068, 0x3032d, 0x750ec8, 0x3032d)
/usr/local/go11/src/pkg/net/tcpsock_posix.go:229 +0x45
net.(*TCPListener).Accept(0xc200159068, 0xc20014ecb0, 0xc20014ecb0, 0xc20014ecb0, 0x0, ...)
/usr/local/go11/src/pkg/net/tcpsock_posix.go:239 +0x25
webgame/server/gamelib.(*ServerMex).RunServer(0xc2000bf9b0, 0xc2000fb2a0, 0x2, 0x5, 0xc2000fb2a0, ...)
/Users/gao/code/mygo/src/webgame/server/gamelib/server.go:185 +0x113
main.main()
/Users/gao/code/mygo/src/webgame1111/server/gameai/server.go:36 +0x90

goroutine 2 [syscall]:




but but but  but but but but !!!! well I can assure you there is always a method to my madness.  

gamelib/server.go  in line 33 ,

},
HEAD_14B: func(r *Request, b []byte) {
if len(b) &amp;lt; 14 {
return
}
Log.Println(b) // Now … the pain not exists!  
buf := bytes.NewBuffer(b)
tbuf = bytes.NewBuffer(buf.Next(2))
binary.Read(tbuf, binary.BigEndian, &amp;amp;r.Cid)
tbuf = bytes.NewBuffer(buf.Next(4))
binary.Read(tbuf, binary.BigEndian, &amp;amp;r.Rid)

tbuf = bytes.NewBuffer(buf.Next(4))
binary.Read(tbuf, binary.BigEndian, &amp;amp;r.Uid)

tbuf = bytes.NewBuffer(buf.Next(2))
binary.Read(tbuf, binary.BigEndian, &amp;amp;r.Typ)
tbuf = bytes.NewBuffer(buf.Next(2))
binary.Read(tbuf, binary.BigEndian, &amp;amp;r.Mlen)
r.Msg = buf.Next(int(r.Mlen))
},



My system ……

Darwin gaomatoMacBook-Air.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64


&lt;/pre&gt;</description>
    <dc:creator>able</dc:creator>
    <dc:date>2013-05-21T21:44:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96905">
    <title>How to parse variable-length month number with time.Parse</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96905</link>
    <description>&lt;pre&gt;Hi,

I have a date format that looks like this:

4/9/2008T17:01:00

representing "the 9th of April of 2008, at 5:01 PM".

time.Parse understands "_2" as a day number that might or might not have a 
leading zero.

is there an equivalent for months?

I tried parsing using the layout "_1/_2/2006T15:04:05" but that doesn't 
work.

parse "4/9/2008T17:01:00" as "_"

Cheers,

- Tom

&lt;/pre&gt;</description>
    <dc:creator>tomwilde</dc:creator>
    <dc:date>2013-05-21T21:44:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96894">
    <title>[ANN] npipe - Go wrapper for Windows named pipes</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96894</link>
    <description>&lt;pre&gt;If you like Windows named pipes (and who doesn't? ...don't answer that ;) 
now you can use them in Go:

https://github.com/natefinch/npipe

docs: http://godoc.org/github.com/natefinch/npipe

The package is built to be used just like the net package in the stdlib, so 
you have Dial, Listen, and Accept. Note, the Read and Write timeouts on the 
Connection object are only supported in Windows Vista and above due to a 
Windows API limitation.

I actually learned a bunch of interesting things writing this package, like 
the fact that a perl script is used to generate the syscall implementations 
in package syscall (boo for the Go authors making me install perl! ;) ... 
and that all Go-initiated IO on Windows XP and previous versions is 
shuttled off into a single, well-known thread, exactly to get around the 
Windows API issue I mentioned above (which, if you're curious, is that 
WinXP will only let you cancel IO from the same thread that it was called 
from).

The package should be considered beta quality software... there are 
sufficient tests that I think the code is fairly stable, but it has not 
been put to regular, strenuous use. I encourage pull requests.

-Nate

&lt;/pre&gt;</description>
    <dc:creator>Nate Finch</dc:creator>
    <dc:date>2013-05-21T21:01:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96889">
    <title>XML Unmarshalling</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96889</link>
    <description>&lt;pre&gt;Hello,

I'm having a little trouble parsing XML. I'm trying to parse output from 
Dell's SOAP inventory service 
(see http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation). 
My example program tries to pull out relevant info and print out 
CSV-formatted  lines for each service agreement:

    http://play.golang.org/p/nJSBNyCaXB

There's a number of things I'm unsure about:

- I'm reading a sub-element of the XML. Do I have to specify its parents in 
a tag somewhere?
- Should I specify the namespace in every element, just the containing 
elements, or at all?
- When parsing nested XML, should I tag the field in the containing struct, 
or put an XMLname field in the substruct?

Unfortunately I have to parse a lot of nasty XML at my job. I would love to 
be able to use Go to do it.

Cheers,
David

&lt;/pre&gt;</description>
    <dc:creator>droyo-Tq8V6BaqKXT1P9xLtpHBDw&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T19:14:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96881">
    <title>default package names and hyphens</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96881</link>
    <description>&lt;pre&gt;I know that the default name for an imported package is the last path 
component in the full package name.  So "a/b/c" is, by default, imported 
using the name "c".  

However, I just realized that go will split on hyphens as well.  So "a/b-c" 
is, by default, also imported using the name "c".  I've never seen this 
documented anywhere, so wanted to confirm that this is in fact intended 
behavior that won't be accidentally removed at some point.  Is it generally 
acceptable to use this naming convention, or is it discouraged?  (it does 
generally help clean up the imports of many packages that are named 
"go-package").

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>Will Norris</dc:creator>
    <dc:date>2013-05-21T15:19:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96862">
    <title>What's the point in compiling to the metal?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96862</link>
    <description>&lt;pre&gt;Hello,

my question may seem odd at first sight. But I think it is a valid one, 
because VMs meanwhile offer very good performance and portability anyway. 
Is generating machine code in Go a deliberate decision to get as much 
performance as possible or is it maybe simply a side-effect, because that's 
what the Plan 9 compiler puts out anyway?

Regards, Bienlein

&lt;/pre&gt;</description>
    <dc:creator>Bienlein</dc:creator>
    <dc:date>2013-05-21T15:34:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96861">
    <title>GopherAcademy Job Board</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96861</link>
    <description>&lt;pre&gt;I'm happy to announce the open beta of Gopher Academy's Job Board[1]  Jobs are always free to search, but may have a nominal fee to post in the future.  In addition to the ongoing organization of GopherCon 2014[2], this is part of Gopher Academy's ongoing effort to help build community resources for Go developers.

Best Regards,
The Gopher Academy Team

[1] http://www.gopheracademy.com/jobs
[2] http://www.gophercon.com

&lt;/pre&gt;</description>
    <dc:creator>Brian Ketelsen</dc:creator>
    <dc:date>2013-05-21T15:33:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96855">
    <title>net/url#URL.Path has '%2F' turned into '/'</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96855</link>
    <description>&lt;pre&gt;And, as ServeMux uses req.URL.Path for matching URLs against patterns, 
/foo%2Fbar leads to the same page as /foo/bar. 

Is that expected and correct? It's not this way with, say, Apache.


&lt;/pre&gt;</description>
    <dc:creator>Toni Cárdenas</dc:creator>
    <dc:date>2013-05-21T14:10:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96844">
    <title>[ANN] Gost: Deploying with gtihub push</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96844</link>
    <description>&lt;pre&gt;Hi list.

I added new program "gost" in my repo.

https://github.com/mattn/gost

This is a small program that can deploy web service with github push. When 
this web application receive github push, it run following tasks.

1. Stop an updated service via goreman's RPC.
  This service should be run via goreman.
  See: https://github.com/mattn/goreman

2. Run command like git pull
  So you should specify git repo as http:// scheme not git&amp;lt; at &amp;gt;.

3. Start a service 

For example:

Procfile
---
web1: bundle exec ruby web.rb
gost: gost -c gost.json
gorem: gorem -c gorem.json
---

gorem.json
---
{
  "mattn": {
    "address": "127.0.0.1:80",
    "entries": {
      { "path": "/deploy/", "backend": "127.0.0.1:8100" },
      { "path": "/app1/", "backend": "127.0.0.1:8101" },
    }
  }
}
---
# You can change port of gorem to nginx upstream.

gost.json
---
{
  "addr": "127.0.0.1:8100",
  "apps": {
    "web1": {
      "proc": "my-ruby-app",
      "path": "/home/mattn/dev/my-ruby-app/"
    }
  }
}
---

At the last, you must add webhook for the repository of my-ruby-app on 
github. You can deploy it with github push.

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>mattn</dc:creator>
    <dc:date>2013-05-21T13:22:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96840">
    <title>[ANN] Easy way to select JSON element</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96840</link>
    <description>&lt;pre&gt;Hi list.

I wrote small library to select JSON element from interface{}.
Go require struct for scaning data from JSON. As you know, it's possible 
with interface{}, but it's harder to select deepy structure like:

var a interface{}
json.NewDecoder(os.Stdin).Decode(&amp;amp;a)
a.(map[string]interface{})["foo"].(interface[string]interface{})["bar"].([]interface{})[2].(string)

I'm thinking go-scan is useful to select deepy structure in interface{}.
For example:

1. Scan string

   // { "foo": { "bar": "baz" } }
   var s string
   scan.ScanTree(a, "/foo/bar", &amp;amp;s) // s should be "baz"

2. Scan float64

   // { "foo": { "bar": 3 } }
   var f float64
   scan.ScanTree(a, "/foo/bar", &amp;amp;f) // s should be 3.0

3. Scan bool

   // { "foo": { "bar": true } }
   var b bool
   scan.ScanTree(a, "/foo/bar", &amp;amp;b) // s should be true

4. Scan slice of string

   // { "foo": { "bar": ["go", "lang"] } }
   var s []string
   scan.ScanTree(a, "/foo/bar", &amp;amp;s) // s[0] should be "go", s[1] should be 
"lang"

https://github.com/mattn/go-scan

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>mattn</dc:creator>
    <dc:date>2013-05-21T12:39:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96839">
    <title>[ANN] z.go -- Wu wei terminal directory jumping</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96839</link>
    <description>&lt;pre&gt;I just wrote my first Go program:
    https://github.com/baskerville/z.go

The main advantages of z.go over z are speed and bendability.

Greetings,
&lt;/pre&gt;</description>
    <dc:creator>Bastien Dejean</dc:creator>
    <dc:date>2013-05-21T09:34:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96837">
    <title>[ANN] gobin: Value persistence using gob</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96837</link>
    <description>&lt;pre&gt;http://code.google.com/p/gobin/

My first stab at making something generally useful. (as opposed to toys for 
me)

Allows you to store values using gob-like mechanics and then retrieve the 
ones you want later in an arbitrary order. (via id or name)
Uses gob under the hood.

Tries to do some fancy stuff like fail-safety too.

Let me know if I'm doing it all wrong.

Or if it's not idiomatic go.

&lt;/pre&gt;</description>
    <dc:creator>Liam LeFey</dc:creator>
    <dc:date>2013-05-21T06:12:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96820">
    <title>check for slice overlap</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96820</link>
    <description>&lt;pre&gt;I'm trying to determine whether two slices overlap.
This is what I have come up with using "unsafe":

package main

import (
"fmt"
"unsafe"
)

func doesOverlap(a, b []float64) bool {
aStart := uintptr(unsafe.Pointer(&amp;amp;a[0]))
aEnd := uintptr(unsafe.Pointer(&amp;amp;a[len(a)-1]))
bStart := uintptr(unsafe.Pointer(&amp;amp;b[0]))
bEnd := uintptr(unsafe.Pointer(&amp;amp;b[len(b)-1]))
return !(aEnd &amp;lt;= bStart || bEnd &amp;lt;= aStart)
}

func main() {
x := []float64{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
ys := x[0:5]
ym := x[2:7]
ye := x[5:10]
fmt.Println(doesOverlap(ys, ye))
fmt.Println(doesOverlap(ye, ys))
fmt.Println(doesOverlap(ys, ym))
fmt.Println(doesOverlap(ym, ye))
fmt.Println(doesOverlap(ys, x))
fmt.Println(doesOverlap(ym, x))
fmt.Println(doesOverlap(ye, x))
// Output:
// false
// false
// true
// true
// true
// true
// true
}

Two questions:
1) Is there a more efficient way?
2) Is it possible to avoid the use of "unsafe" without having to check 
the address of each element in both slices?


Nico

PS: Note that I don't want to determine whether two slices share the 
same base array as in math/big:

// alias returns true if x and y share the same base array.
func alias(x, y nat) bool {
     return cap(x) &amp;gt; 0 &amp;amp;&amp;amp; cap(y) &amp;gt; 0 &amp;amp;&amp;amp; &amp;amp;x[0:cap(x)][cap(x)-1] == 
&amp;amp;y[0:cap(y)][cap(y)-1]
}

&lt;/pre&gt;</description>
    <dc:creator>Nico</dc:creator>
    <dc:date>2013-05-21T11:36:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96815">
    <title>Go issue tracker problem</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96815</link>
    <description>&lt;pre&gt;Hi, folks!

I'm experiencing a problem submitting an issue to the golang issue tracker: 
https://code.google.com/p/go/issues/list.

I'm filing the issue, get a 'Thank you for creating issue X', but then 
after a page refresh it is said that the issue was deleted. I thought that 
maybe it is somehow connected with some premoderation/review, but my first 
issue didn't appear even after 6-8 hours. I created another similar one, 
but got the same story. 

Could anyone help me with that? Maybe I do something wrong. The issue 
itself:

======================================

What steps will reproduce the problem?

Compile and run http://play.golang.org/p/fI1wA1Uq4A

What is the expected output?

http://javascript.ru HEAD: OK
http://javascript.ru GET: OK
http://example.com HEAD: OK
http://example.com GET: OK

What do you see instead?

http://javascript.ru HEAD: OK
http://javascript.ru GET: Error: Get http://javascript.ru: malformed HTTP 
version 
"\x1f\x8b\b\x00\x00\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00HTTP/1.1"
http://example.com HEAD: OK
http://example.com GET: Error: Get http://example.iana.org: EOF

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

6g

Which operating system are you using?

Ubuntu 13.04

* Also reproducible on Windows 7

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

go version go1.1 linux/amd64

* Also reproducible on: devel +c786b0f8eb4b Tue May 21 03:22:52 2013 +0800 
windows/amd64

Please provide any additional information below.

The issue happens after sending a 'HEAD' request to a resource and then 
performing another request. In the snippet above, I send 'HEAD' and then 
'GET'. The same would be if 'HEAD' after 'HEAD' is used. If 'HEAD' request 
is not used, then no such errors occur.

&lt;/pre&gt;</description>
    <dc:creator>_tb</dc:creator>
    <dc:date>2013-05-21T09:36:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96813">
    <title>Get the current user in linux/386</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96813</link>
    <description>&lt;pre&gt;I get this message:
user: Current not implemented on linux/386

any work arounds?

&lt;/pre&gt;</description>
    <dc:creator>Jon Renner</dc:creator>
    <dc:date>2013-05-21T09:19:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96810">
    <title>The best way to check if File is a directory?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96810</link>
    <description>&lt;pre&gt;Can this be improved upon?

func isADirectory(path string) bool {
f, err := os.Open(path)
handleError(err)
stat, err := f.Stat()
handleError(err)
return stat.IsDir()
}

&lt;/pre&gt;</description>
    <dc:creator>Jon Renner</dc:creator>
    <dc:date>2013-05-21T07:46:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96794">
    <title>Transparent Redirect Http Handler</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96794</link>
    <description>&lt;pre&gt;Given a website with the following structure:

http://domain/ &amp;lt;-- ASP Website
http://domain/A &amp;lt;-- ASP Website
http://domain/B &amp;lt;-- Go Service
http://domain/B/A &amp;lt;-- Go Service

How would one make a visit to "/B/A" automatically return everything under 
"/A"?  Would this be a case for using the "NewSingleHostReverseProxy" 
function in "net/http/httputil", or, would multiple HandleFuncs better 
achieve the desired routing?  If the latter, how would that even work, 
given that "/A" is not part of the Go service?  I'm guessing Go's proxy is 
what's needed, but it's unclear how to use it in this scenario.

Sorry if this is elementary.

&lt;/pre&gt;</description>
    <dc:creator>gjwatersjr-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T00:30:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96785">
    <title>should I use gccgo for production always?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96785</link>
    <description>&lt;pre&gt;According to the documentation, GCCGO can provide more performance, for any 
program faster is better, so should I stick with gccgo for production?

&lt;/pre&gt;</description>
    <dc:creator>davy zhang</dc:creator>
    <dc:date>2013-05-21T01:43:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96778">
    <title>gofmt in 1.1 uses a different field alignment method?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96778</link>
    <description>&lt;pre&gt;Hello,

The following example shows how the code is formatted in go 1.1.
Clicking Format shows what it used to do in 1.0.3:

http://play.golang.org/p/akSyveAFxu

I first thought that it had something to do with the relative length
of the field names, but it seems to be more complicated than that. Was
the algorithm changed on purpose or is this a bug?

- Max

&lt;/pre&gt;</description>
    <dc:creator>Maxim Khitrov</dc:creator>
    <dc:date>2013-05-20T22:46:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96775">
    <title>generics via containers?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96775</link>
    <description>&lt;pre&gt;i few months back i played about producing some parallel (channel'ed) LINQ 
type codes, needed much of it, but then thought i'd try and make a general 
library, for experience, but couldn't quite make it as complete as i wanted.

so reading the recent thread;  
https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/fmmmgg3B1Icrang a lot of bells, and made me think it might be useful to post an idea i 
got during this;

have 'range' be able to take an interface of any array, and return 
interface's of the array elements.
(with basically the same thing for channels, and a range over an interface 
to a none container just produce a copy.)

example:

func iterator(values interface{}) interface{} {
outchannel:= make(interface{})
go func() {
for _,v:=range values{
outchannel &amp;lt;- v
}
close(outchannel)
}()
return outchannel
}

values could be an interface to an array OR to a channel, which could come 
from another iterator/generator.

obviously the returned value needs, at some point, to be unboxed by the 
caller to the type that it knows is in the array/channel, and functions 
with unboxing could be passed in as required.

possibly a compiler could optimise (avoid) the boxing/unboxing by 
producing templated code for all the types actually used, and then perhaps 
choose only to do this for relatively short pieces of code, and not for 
long elaborate pieces, allowing code caching optimisation when fruitful?



&lt;/pre&gt;</description>
    <dc:creator>simon place</dc:creator>
    <dc:date>2013-05-20T21:58:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.go.general/96763">
    <title>GOPATH question / clarification</title>
    <link>http://comments.gmane.org/gmane.comp.lang.go.general/96763</link>
    <description>&lt;pre&gt;Hello again,

I have my .bashrc setting as:

export GOROOT=/usr/local/go
export PATH=$PATH:$GOPATH/bin/
export GOPATH=$HOME/gocode


and in my /gocode directory I have /pkg /bin /src 

When I run go install acmemain.go from my /gocode directory I get the 
following error.

drose&amp;lt; at &amp;gt;QC2-Ubuntu-01:~/gocode$ go install acmemain.go
go install: no install location for directory /home/drose/gocode outside 
GOPATH


I have a package called acme which does get sucessfully installed when I am 
in /gocode/src/acme just by running "go build" and then "go install" into 
the /gocode/pkg/linux_amd64/ directory. 

Can you tell me what I am doing wrong?

Thanks,
Dave Rose

&lt;/pre&gt;</description>
    <dc:creator>Dave Rose</dc:creator>
    <dc:date>2013-05-20T20:21:54</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.go.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.go.general</link>
  </textinput>
</rdf:RDF>
