Search Discussions

399 discussions - 2,612 posts

  • I think the Sort function in the sort package is a good example of a generic function. Then why keep people asking for generics? What am I missing? -- You received this message because you are ...
    Peter KleiwegPeter Kleiweg
    Dec 14, 2014 at 11:19 am
    Dec 23, 2014 at 5:26 pm
  • I propose the following modest language change for Go 1.5. (This is issue #9367.) An explicit conversion int(b) where b has a boolean type would become legal, and would yield 1 if b is true, 0 ...
    Dec 17, 2014 at 7:33 pm
    Dec 20, 2014 at 12:03 am
  • I have wrote some code like this: type Base struct {} func (b Base) Values() []string { return nil // non-common code } func (b Base) PrintValues() { fmt.Println(b.Values()) // common code } type Sub ...
    Zhu aihuiZhu aihui
    Dec 9, 2014 at 6:27 am
    Dec 12, 2014 at 2:32 pm
  • As rust 1.0 is almost here, I can point out quite a few things that rust is better than go. However, I don't really see how go is better than rust. As both rust and go are meant to replace C++, they ...
    Theemathas ChirananhavatTheemathas Chirananhavat
    Dec 12, 2014 at 2:02 am
    Dec 13, 2014 at 10:32 pm
  • Hello, I run this program on one of our new huge servers (1 TB ram, 40 core (10core x 4 cpu) Xeon E5-4650 v2, CentOS release 6.5, go version go1.4 linux/amd64 ): https://play.golang.org/p/yAJPIu-WSf ...
    Glen NewtonGlen Newton
    Dec 23, 2014 at 4:11 pm
    Apr 1, 2015 at 2:05 am
  • Hi all, I am getting an error about an unused variable (dev in the below code) and I guess I have misunderstood something about the scope rules and/or := operator. dev := "unknown" if dev, err := ...
    Richard DanterRichard Danter
    Dec 1, 2014 at 11:56 am
    Dec 2, 2014 at 7:53 am
  • Let's say you want to create some generic collection manager that keeps a cache of some remote objects of different types which are supplied through some king of a sourcer object that always returns ...
    Dec 31, 2014 at 10:34 am
    Jan 6, 2015 at 8:04 pm
  • Working on a project, we came across a need to stop a io.ReadCloser after we have handed it off to a consumer. The naive solution is to call Close() on the ReadCloser when we are signaled to cancel ...
    Dec 9, 2014 at 11:03 pm
    Dec 12, 2014 at 9:29 pm
  • The way Go encodes stdout differently drives me crazy. I have a program which reads an UTF-8 string from a web server. And I would like to run it on Windows. Windows uses UTF-16. Go seems to have ...
    Dec 7, 2014 at 11:16 am
    Dec 12, 2014 at 7:27 pm
  • Say I have 25 functions, some of which have no dependencies, and some of which are dependent on one or more of the other functions. They dependencies are acyclic. I want to run each function in a ...
    Alex ZylmanAlex Zylman
    Dec 3, 2014 at 3:06 am
    Dec 4, 2014 at 1:17 am
  • Hi gophers, We just released Go 1.4. You can read the announcement blog post here: https://blog.golang.org/go1.4 You can download binary and source distributions from our download page ...
    Andrew GerrandAndrew Gerrand
    Dec 11, 2014 at 5:38 am
    Dec 12, 2014 at 3:22 pm
  • My first Go program. Best Regards Chris -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from ...
    Chris HinsleyChris Hinsley
    Dec 19, 2014 at 4:04 pm
    Dec 21, 2014 at 6:27 am
  • A few months ago, Clojure introduced "transducers" - a composable way to build reusable algorithmic transformations - and baked it into the foundations of their latest release. Think iteration, ...
    Sam BoyerSam Boyer
    Dec 5, 2014 at 11:59 pm
    Dec 11, 2014 at 6:39 pm
  • Hello guys ! I'm writting my first prog in Golang and I have a question about performances of regexp here. I have an html source in a string var (contenu_html), with like 20 links inside, and want to ...
    Dec 5, 2014 at 5:30 pm
    Dec 8, 2014 at 11:36 pm
  • Running go 1.3.3 on Mac (darwin/amd64), got the same error on CentOS also (linux/amd64). I'm running go from source. $ hg summary parent: 20236:f44017549ff9 go1.3.3 release go1.3.3 branch ...
    Shane TurnerShane Turner
    Dec 1, 2014 at 3:54 pm
    Dec 5, 2014 at 11:39 pm
  • In other words, given the same source files and same compiling flags and environment variables (GOOS, GOARCH and friends), is the binary produced by `go build` (of same version) the same on different ...
    Dec 4, 2014 at 2:43 am
    Dec 5, 2014 at 1:39 am
  • GOPATH and GOROOT env variables should be set the same way the documentation not clearly show us how to setting GOPATH https://golang.org/doc/install so here is my changes ...
    Dec 15, 2014 at 8:51 am
    Dec 16, 2014 at 4:39 am
  • In https://golang.org/ref/mem , it talked about how to avoid double-checked locking to initialize one variable, by using once.Do. But how to efficiently and thread-safely initialize a multi-threaded ...
    Dec 5, 2014 at 7:36 pm
    Dec 7, 2014 at 3:12 pm
  • Is it possible Google donate golang project to a open source foundations or fund a foundation ? Go lang growing fast, so many and many users in the world now days. But the google controlled the whole ...
    Zixu moZixu mo
    Dec 20, 2014 at 4:14 am
    Dec 21, 2014 at 9:17 pm
  • Hi guys, I am trying to implement a singleton pattern by using Go since I am a Gopher from Java world. There are few questions I currently have. 1. in Java, we use synchronized keywords to forbidden ...
    Yan DaiYan Dai
    Dec 16, 2014 at 10:23 pm
    Dec 17, 2014 at 4:47 pm
  • Ok with the brand new go 1.4 release I try to use the Canonical import path feature as in package loop // import "gopkg.in/metakeule/loop.v1" Now the problem is: If I use a vanity import path as ...
    Meta keuleMeta keule
    Dec 13, 2014 at 10:55 pm
    Dec 17, 2014 at 3:32 pm
  • Go has the concept of embedding structs into new structs. But how to embed packages into new packages? I would like to make my own flag package, because the existing flag package does not support ...
    Dec 12, 2014 at 10:07 am
    Dec 15, 2014 at 4:15 pm
  • Hello, does go have library for reliabile udp? or how can i deal with udp transport that needs quarantine packet delivery? -- Vasiliy Tolstov, e-mail: <span class="m_body_email_addr" ...
    Vasiliy TolstovVasiliy Tolstov
    Dec 10, 2014 at 8:22 pm
    Dec 12, 2014 at 4:54 pm
  • In what circumstances Go panics like "*signal arrived during cgo execution*" when calling a *dll*? The code to be called is - based on samples in zsyscall_windows.go in src of go distribution: var ( ...
    Dec 30, 2014 at 3:48 pm
    Jan 4, 2015 at 8:26 am
  • Hi everyone, I've started a project to implement a few elementary data structures and containers for Go. The goal is to have all the needed building blocks for creating more complex solutions and ...
    Diego GiagioDiego Giagio
    Dec 26, 2014 at 12:45 pm
    Dec 28, 2014 at 5:36 pm
  • Hello gophers, I'd like to announce a tool I've been working on; it's available in the form of a website. It's just like godoc.org, but given an import path of any Go package, it displays its ...
    Dmitri ShuralyovDmitri Shuralyov
    Dec 21, 2014 at 3:30 am
    Dec 23, 2014 at 8:33 am
  • I have large amounts of JSON arrays that I would like to parse one row at a time. In the json documentation, it has the following example which shows how to parse groups of json independently. Each ...
    Derek PerkinsDerek Perkins
    Dec 8, 2014 at 11:37 pm
    Dec 11, 2014 at 7:04 pm
  • Hi gophers! I know there are no plans for big language changes, but I found a detail which might be interesting to think about, regarding which operators are able to handle multiple return values ...
    Jon ValdésJon Valdés
    Dec 13, 2014 at 8:35 am
    Dec 13, 2014 at 2:52 pm
  • Problem: When errors don't seem worth a full fledged type, people sometimes use the var err = errors.New(...) pattern: var ( // ErrNoPreamble indicates that a preamble was not found in the input ...
    Antoine GrondinAntoine Grondin
    Dec 11, 2014 at 7:51 pm
    Dec 11, 2014 at 10:57 pm
  • After update to go 1.4 i'm not able to get static binary, before update i do: CGO_ENABLED=0 go build -a -x now as i understand -a not used for standard go packages, how can i build static binary and ...
    Vasiliy TolstovVasiliy Tolstov
    Dec 15, 2014 at 11:49 am
    Dec 16, 2014 at 1:38 pm
  • Hi, I'm trying to get the source of go tour for offline hosting, any idea on how to resolve? GOROOT & GOPATH was set, running on Ubuntu 14.04. full error: user@linux:~$ go get ...
    Angelo AngelesAngelo Angeles
    Dec 14, 2014 at 3:09 pm
    Dec 15, 2014 at 2:44 pm
  • Hi, everyone I had learn Golang in part time about 3 weeks now and I'm trying to make a multi-room chat server for fun. My implement only can handle about 500 connections in a room, which is about ...
    Zhuo MengZhuo Meng
    Dec 24, 2014 at 3:34 pm
    Dec 25, 2014 at 1:33 pm
  • Hi All, I'm seeing an issue with rebuilding a library when changes are made to the source code in a separate library. Suppose there are two directories in my GOPATH: export ...
    James GravesJames Graves
    Dec 28, 2014 at 10:45 pm
    Jan 5, 2015 at 1:35 pm
  • All, I know this has to be simple but I am currently stumped. I am reading in a file that has lines delimited by "\n" and I want to reverse the order of the lines and then display it to the user. The ...
    Luke MauldinLuke Mauldin
    Dec 19, 2014 at 3:46 pm
    Dec 23, 2014 at 6:27 pm
  • Hi! I'm trying to write a web service that has a single function: 1. Reads an integer from a file (Windows file system) 2. Increments the integer 3. Writes the new value out (overwrites the old file) ...
    Bryan JarvisBryan Jarvis
    Dec 10, 2014 at 4:58 pm
    Dec 11, 2014 at 3:55 pm
  • In the package net/rpc, I'm wondering why the reply is a pointer argument and not a return value. In other words, why do we have this: func (t *T) MethodName(argType T1, replyType *T2) error instead ...
    Nicolas GrillyNicolas Grilly
    Dec 2, 2014 at 1:41 pm
    Dec 3, 2014 at 7:27 pm
  • Hello everybody, I'm wondering what is wrong with "time" package Format() function? It's behaviour goes beyond my comprehension: func main() { t := time.Now() fmt.Println(t.Format("Jan 2, 2014")) ...
    Alexander LobunetsAlexander Lobunets
    Dec 3, 2014 at 12:30 pm
    Dec 3, 2014 at 6:26 pm
  • I'm doing some audio programming with Go on Android and I noticed that my audio callback continues to be called even long after I leave the app. I assume that the process continues to run in the ...
    Gordon KlausGordon Klaus
    Dec 18, 2014 at 8:03 pm
    Dec 20, 2014 at 2:55 am
  • I need to find multi-line regexps in a file. The lines I'm interested in start with "<Intercept " and end with "</Intercept ". These regexps work to find the start and end lines: "(?m)^.*?<Intercept ...
    Dean SchulzeDean Schulze
    Dec 17, 2014 at 5:08 am
    Dec 18, 2014 at 3:22 pm
  • Hi sflag is the only known flag package variant, at the time of writing, that is 100% DRY, free of fugly pointer syntax and uses clean struct syntax. The implementation makes use of reflection and ...
    Dec 2, 2014 at 3:33 am
    Dec 8, 2014 at 9:55 am
  • hi i want write function which check session login in panels page . in following code i write checklogin and called it on panel function but it not work , while i run localhost:3030/panel page is ...
    Dec 4, 2014 at 2:08 pm
    Dec 7, 2014 at 11:25 am
  • my go version is go version go1.4 darwin/amd64 I clone the go/mobile <https://github.com/golang/mobile repo and build it using docker: go get -d golang.org/x/mobile/... docker build -t mobile ...
    Zhou AmritaZhou Amrita
    Dec 13, 2014 at 7:13 am
    Feb 21, 2015 at 1:13 am
  • Hi. After some experiments I have decided that, for me, Go is a good substitute for C and Python. Since I writing some projects in Go I would like to choose one project layout guideline and stick ...
    Manlio PerilloManlio Perillo
    Dec 18, 2014 at 1:22 pm
    Dec 18, 2014 at 6:45 pm
  • I have an application plan that requires in-app compilation of go source to a loadable module, and sandboxed execution of the module in the existing go app/process. I'm hoping that might be possible ...
    Liam BreckLiam Breck
    Dec 15, 2014 at 11:44 pm
    Dec 17, 2014 at 10:48 pm
  • I think I find this behaviour if not wrong at least strange. Consider the code: http://play.golang.org/p/wwCCHwL-MH Both wrapper structs marshal to the same JSON but unmarshaling returns a map(?) in ...
    Henrik JohanssonHenrik Johansson
    Dec 16, 2014 at 1:41 pm
    Dec 17, 2014 at 4:18 pm
  • Hi. I have noted that Go syntax is missing some simply and useful features that are available in some "modern" programming languages. 1) Hex floating point literal. I have started to use hex float ...
    Manlio PerilloManlio Perillo
    Dec 10, 2014 at 1:19 pm
    Dec 17, 2014 at 12:16 am
  • Hi all, Why it does not work? http://play.golang.org/p/zBQ46RYn5T Igor -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group ...
    Igor DolzhikovIgor Dolzhikov
    Dec 8, 2014 at 5:24 pm
    Dec 8, 2014 at 6:31 pm
  • Hi All, GTF: https://github.com/ZhangQin3/GTF GTF is a generic test automation framework based on golang, it is named as Golang Test Framework(GTF). Now, GTF is in its very early stage, but it has ...
    Zhang QinZhang Qin
    Dec 3, 2014 at 12:12 pm
    Dec 5, 2014 at 10:28 am
  • Does anyone have a broad explanation for the following? It is marginally reproducible error when running some tests I have. Consistent reproducer is beyond me at the moment. thanks ...
    Dan KortschakDan Kortschak
    Dec 26, 2014 at 10:30 pm
    Dec 27, 2014 at 8:50 am
  • Hi gophers, Please assist me i have the following which works fine .. package main import ( "./mypkg" "log" "net/http" ) func main() { http.HandleFunc("/", mypkg.IndexHandler) if err := ...
    Dec 18, 2014 at 4:44 pm
    Dec 18, 2014 at 6:05 pm
Group Navigation
period‹ prev | Dec 2014 | next ›
Group Overview
groupgolang-nuts @

566 users for December 2014

Dave Cheney: 120 posts Ian Lance Taylor: 96 posts Atdiar: 52 posts Egon Elbre: 49 posts Minux: 44 posts Konstantin Khomoutov: 43 posts James Bardin: 39 posts Amir-taghavi: 34 posts Manlio Perillo: 34 posts Matt Harden: 31 posts Ian: 29 posts 莫子虚: 26 posts Gyu-Ho Lee: 25 posts Henrik Johansson: 24 posts Jan Mercl: 24 posts Rob Pike: 24 posts Shawn Milochik: 23 posts Tamás Gulácsi: 23 posts 小菜: 23 posts Nick Craig-Wood: 22 posts
show more