Search Discussions
-
1. Remove the trailing 'return' if return values are named. e.g. func foo() (res int) { res = 10 } 2. Supporting of ternary operators: ? : mn := a < b ? a : b David --
David DENG
Dec 4, 2012 at 9:57 am
Dec 9, 2012 at 8:24 am -
When it comes to Go's answer to C++'s template programming, I often see the type interface{} provided as a remedy: For example: For example, this: func add(a, b interface{}) (c interface{}, err ...
Sindre Devik
Dec 18, 2012 at 9:59 pm
Jan 2, 2013 at 8:26 pm -
Good news everyone! I'm happy to announce a preview of http://gonuts.io/ – centralized repository for versioned Go packages. Why do I think Go ecosystem need this? There are two problem "go get" ...
Alexey Palazhchenko
Dec 9, 2012 at 9:23 am
Apr 11, 2013 at 12:31 pm -
What is the design reason behind prohibiting pointer-type receivers? --
Dan Kortschak
Dec 15, 2012 at 7:37 am
Dec 17, 2012 at 10:02 am -
I'm working on a tool that runs 1,000s of regexp replace instructions across ~200,000 files (adding up to ~4gb atm). Currently this is written as a shell script using git grep + perl + xargs + ...
Naitik Shah
Dec 1, 2012 at 7:13 am
Dec 7, 2012 at 7:43 am -
Hi, I want to build a easy simple kernel in Go1. I use Qemu and Grub2 and my kernel is x86-64. My first problem, there is no `__attribute__((section (".grub_sig")))` for gccgo so I can't fill the ...
Guillaume Lescure
Dec 20, 2012 at 4:28 pm
Jan 17, 2013 at 11:14 pm -
I've seen this discussion a few times and it keeps biting new users (or at least me when they come asking me for help). Does anyone have any strong opinions on changing the default GOPATH behavior to ...
Dustin Sallings
Dec 13, 2012 at 8:09 pm
Dec 16, 2012 at 2:13 am -
is Go suitable for the application of statistics and analysis of big data? is meet the challenges of big data http://blogs.worldbank.org/opendata/node/556 --
Likelihood
Dec 20, 2012 at 12:08 am
Jan 27, 2013 at 10:16 am -
In Go's specification, it is stated that the expression in Go's if statement[1] can be preceded by a simple statement, which includes a short var declaration. The following example (adapted) is ...
Rui Maciel
Dec 10, 2012 at 12:23 pm
Dec 25, 2013 at 5:50 am -
Hi, Using the emoding/json or encoding/xml packages, is it possible to unmarshal JSON/XML into enums? For example, I have an XML field which should have only two possible values and I can define ...
Robert D.
Dec 27, 2012 at 12:54 pm
Jan 2, 2013 at 6:30 pm -
Rationale: During debugging, printing nested structs with fmt.Printf("%+v", data) would come handy. --
Johann Höchtl
Dec 9, 2012 at 3:43 pm
Jan 19, 2013 at 8:13 pm -
I'm just starting to use go and very positively impressed. I've however surprised about following idiom: go func() { callSomeFunc() } () I wonder why this could not be 'sugarized' to: go { ...
Vadiml1024
Dec 21, 2012 at 7:25 pm
Dec 22, 2012 at 9:54 pm -
So, I saw yet another post about generics in Go, and I had the same thought I'd had before... could we simply use code generation to replace generics? Most template / generic code is simply there to ...
Nate Finch
Dec 31, 2012 at 10:07 pm
Jan 2, 2013 at 1:21 pm -
Hi there! I've created a User-Agent string parser. Check it out here: https://github.com/mssola/user_agent . It's the first project I've done in Go. Hope you guys like it :) Greetings, Miquel --
Miquel Sabaté Solà
Dec 19, 2012 at 2:18 pm
Dec 20, 2012 at 6:53 pm -
I have a func that should set the Content-Type header if it does not already exist. It seems like the Header implementation <http://golang.org/src/pkg/net/http/header.go?s=298:329#L6 does this ...
Christian
Dec 13, 2012 at 9:28 pm
Dec 16, 2012 at 5:09 pm -
This took me quite a while. But some hours now and then were allways a welcome change from mind crippling Cobol-coding . Here is it: http://www.bitloeffel.de/DOC/golang/go_spec_de.html To me, the ...
HaWe
Dec 9, 2012 at 8:23 pm
Dec 11, 2012 at 8:09 pm -
Hello, I'm curious about the design of crypto/rand. The current implementation relies on the system's CSPRNG (/dev/urandom or CryptGenRandom). Is there a reason why these sources of random bytes are ...
Maxim Khitrov
Dec 2, 2012 at 4:25 pm
Jul 26, 2013 at 12:15 pm -
I sent a pull request to bradgitz for the gomemcache package today (https://github.com/bradfitz/gomemcache/pull/5). The short version is that something like this was in the code: func foo() error { ...
John Graham-Cumming
Dec 19, 2012 at 5:08 pm
Dec 20, 2012 at 4:19 pm -
Creating a new map is easy. But if you can't do that for some reason, then it is correct that the only way to clear all the entries out of the map is to range over the map and call delete. We could, ...
Ian Lance Taylor
Dec 11, 2012 at 6:48 pm
Dec 12, 2012 at 3:34 pm -
Hi gonuts, Just before I dig into the compiler, does anyone have a patch which disallows all variable shadowing for the amd64 gc or know what lines would need to be looked at? Thanks, Simon Watt --
Si guy
Dec 10, 2012 at 3:27 pm
Dec 11, 2012 at 12:28 pm -
http://play.golang.org/p/3fv0L3-z0s This will make its way to golang.org, tour.golang.org, and talks.golang.orgin due course. Andrew --
Andrew Gerrand
Dec 12, 2012 at 11:47 pm
Dec 13, 2012 at 7:34 pm -
We've got an in memory data store comprised of several large maps (up to ~50 million "unit32 pointer") and various linking data structs which totals up to ~10GB. This data also has a fairly high read ...
Hamish Ogilvy
Dec 18, 2012 at 3:38 am
Dec 20, 2012 at 11:05 pm -
Hello, I'm creating my first package that bring list and dict to Go with methods you can found in Python. Because it's my first package in Go I would like to ask if someone can check my code and tell ...
Dobrosław Żybort
Dec 21, 2012 at 4:07 pm
Jan 9, 2013 at 5:38 pm -
Hi All, Does Go have multidimensional arrays/slices at all, or these are just lists of lists? I mean, lf I have a slice a[][]float64, pointing to an underlying array a0[3][4]float64, will it be a ...
Ali Ali
Dec 18, 2012 at 5:35 pm
Dec 19, 2012 at 12:08 am -
Hi, I'm writing some code for a text search engine which has an implementation of sparsetable and I found a bottleneck when summing large numbers of uint8 slices. I love how easy it is in Go to ...
Donovan Hide
Dec 15, 2012 at 5:28 pm
Dec 18, 2012 at 6:23 pm -
Can someone enlighten me, why is it that the larger inner structs get different pointers and the smaller ones get the same? http://play.golang.org/p/wKL4JocwAv Is there any rule? I want to be able to ...
Meta keule
Dec 13, 2012 at 3:03 pm
Dec 13, 2012 at 8:23 pm -
Hi all -- a couple of Gophers have independently hit upon an elegant pattern for iterators in Go. Say you define a FooList type, which might be type FooList []Foo or type FooList struct { list []Foo ...
Greg Ward
Dec 6, 2012 at 5:36 pm
Dec 8, 2012 at 3:32 am -
Hi there gophers, I made this a couple of weeks ago because I need something like Python's webbrowser <http://docs.python.org/3.3/library/webbrowser.html and I forgot to publish it here. It's very ...
Carlos Cobo
Dec 16, 2012 at 2:38 am
Jan 15, 2013 at 8:26 am -
Hi, Take a look at the following example: http://play.golang.org/p/f7gn2EQSZo Why is it legal to attach methods to the global Test type but not to the block-scoped one? Cheers! --
Tomwilde
Dec 6, 2012 at 11:14 am
Dec 6, 2012 at 1:57 pm -
Hello, I don't have full understanding of goroutines and deadlocks possible, but modelled this simple server to process some requests. (based on some code written by Kyle Lemons) So, I have a Service ...
Bsr
Dec 13, 2012 at 6:12 pm
Mar 20, 2013 at 1:08 pm -
Since I can't read C code... just wondered about whether "pure getters" are inlined: type MyRec struct { foo string } func (me *MyRec) Foo () string { return me.foo } If another package imports this ...
Philipp Schumann
Dec 22, 2012 at 11:40 am
Jan 23, 2013 at 4:08 am -
OUYA, the open Android based game console developer version just shipped. Anyone interested in porting/developing in Go? --
Anssi Porttikivi
Dec 28, 2012 at 9:54 am
Dec 30, 2012 at 8:50 pm -
I'm trying to do server-side auth with facebook, i can get to login dialog and permission, but after redirect i didn't get the auth 'code' in redirect handler. any suggestion? FBCfg = &oauth.Config { ...
Kar
Dec 20, 2012 at 3:17 am
Jan 6, 2013 at 10:47 am -
Hi, all. I want to get receiver's embedded attribute in a method, for example: package main import ( "fmt" ) type MyInt int func (i *MyInt)PrintEmbeddedAttr() { fmt.Println(EmbeddedAttr) } type Point ...
I90091e
Dec 18, 2012 at 12:05 pm
Dec 21, 2012 at 2:35 pm -
It intuitively makes sense why you would not want to do this (though I'd like to), but I can't figure out exactly why it works (I'm probably misunderstanding reflection rules). In text template an ...
Dan Kortschak
Dec 13, 2012 at 1:46 am
Dec 13, 2012 at 7:44 pm -
Hi all, Here is shell script I use to test everything in source code directory. #!/bin/sh find . -name '*_test.go' | while read file; do n=$(dirname -- "$file") echo "$n" done | sort -u | while read ...
Boris Solovyov
Dec 28, 2012 at 5:56 pm
Aug 29, 2013 at 9:06 am -
According to: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/SynchronousQueue.html#put%28E%29: * "Synchronous queues are similar to rendezvous channels used in CSP and Ada. They are ...
Michal
Dec 11, 2012 at 11:23 am
Aug 28, 2013 at 12:26 pm -
I am looking for a package that provides functions for splines, smoothing and/or interpolation (not for images, but for raw data). Couldn't find anything on the packages or dashboard page. I am ...
Ondekoza
Dec 29, 2012 at 9:26 pm
Jun 3, 2013 at 7:12 pm -
Hello, I am working on a calculation that is divided into three worker goroutines and I am handing data to each other using buffered channels. Very similar to pipe among three UNIX commands: worker1 ...
Lukáš Zapletal
Dec 30, 2012 at 7:22 pm
Jan 2, 2013 at 3:06 am -
Hi awesome list members, Following code will break because map is nil. ( http://play.golang.org/p/qqZMrG95x7): package main import "fmt" type EuclideanPoint struct { X, Y int } type PointsOfInterest ...
Boris Solovyov
Dec 22, 2012 at 6:15 pm
Dec 25, 2012 at 7:07 pm -
Thank you for all your efforts. Best regards W dniu wtorek, 18 grudnia 2012 07:25:17 UTC+1 użytkownik visualfc napisał: --
Dobrosław Żybort
Dec 18, 2012 at 9:09 am
Dec 21, 2012 at 8:32 pm -
Is there a way in Go to compile additional Go code and then include it? I'm developing a modular mini-game engine, and I'm looking to have the flexibility of custom Go code within a game file. --
Thomas Horton2
Dec 14, 2012 at 12:13 am
Dec 18, 2012 at 3:42 pm -
Do you think that would be right to use a generator (noeqd) for each different table where it's needed a GUID or is it too overkill? I question it because every generator would get a sequential ...
Archos
Dec 2, 2012 at 1:03 pm
Dec 11, 2012 at 9:52 pm -
Hey guys, first post here (so yay) anyways: Im trying to build an html template that will print meta, script and style tags based on a map of tags/scripts/files to include. Heres what Ive got so ...
SGen
Dec 10, 2012 at 10:21 am
Dec 19, 2012 at 10:47 pm -
Hi list, If I make a map of structs, which have methods with side effects, it looks like I must store pointers to the structs in the map, not store the structs themselves. Because you can't take ...
Boris Solovyov
Dec 27, 2012 at 8:48 pm
Jan 12, 2013 at 11:03 pm -
Hello, It is rather a general question. I want to generate unique serial identifiers / keys (alpha numeric string, preferably 10 -12 char long). I saw some discussion about UUIDs and rsc has a simple ...
Bsr
Dec 31, 2012 at 3:48 pm
Jan 2, 2013 at 10:29 pm -
Hi, I am using net.Listen("tcp", addr) for a small server program which is to accept data and STORE it on the server. On the client side, I have a c++ program and I have simply written 4096000 BYTES ...
Raheelgup
Dec 30, 2012 at 8:46 am
Dec 30, 2012 at 10:21 am -
I find myself rather often write func main() { os.Exit(mymain()) } because main doesn't return a status to the os. And calling os.Exit(status) in main is not a good idea as deferred functions wont ...
Johann Höchtl
Dec 20, 2012 at 4:04 pm
Dec 22, 2012 at 1:12 pm -
The SliceTricks page ( http://code.google.com/p/go-wiki/wiki/SliceTricks ) shows some one-line tricks for using a slice as a vector. But I think there are some hidden memory-leaks or efficiency ...
David DENG
Dec 19, 2012 at 4:10 am
Dec 21, 2012 at 12:46 am -
To build good line-oriented aligned output with text/template, as far as I can tell, I must do something like ('score' is a func): ---------------------------- {{.Activity}} Scorecard for ...
Kevin Gillette
Dec 11, 2012 at 10:14 pm
Dec 12, 2012 at 12:41 pm
Group Overview
group | golang-nuts |
categories | go |
discussions | 315 |
posts | 2,603 |
users | 404 |
website | golang.org |
404 users for December 2012
Archives
- June 2016 (815)
- May 2016 (1,277)
- April 2016 (1,340)
- March 2016 (1,589)
- February 2016 (1,499)
- January 2016 (1,419)
- December 2015 (1,217)
- November 2015 (1,490)
- October 2015 (1,768)
- September 2015 (2,186)
- August 2015 (2,240)
- July 2015 (2,221)
- June 2015 (2,056)
- May 2015 (1,508)
- April 2015 (2,023)
- March 2015 (2,186)
- February 2015 (2,032)
- January 2015 (2,219)
- December 2014 (2,612)
- November 2014 (1,886)
- October 2014 (2,115)
- September 2014 (2,267)
- August 2014 (2,172)
- July 2014 (2,509)
- June 2014 (337)
- May 2014 (1,260)
- April 2014 (2,795)
- March 2014 (2,914)
- February 2014 (2,640)
- January 2014 (2,720)
- December 2013 (2,487)
- November 2013 (2,527)
- October 2013 (2,610)
- September 2013 (3,038)
- August 2013 (3,302)
- July 2013 (2,235)
- June 2013 (2,929)
- May 2013 (3,816)
- April 2013 (3,080)
- March 2013 (2,963)
- February 2013 (3,401)
- January 2013 (3,865)
- December 2012 (2,603)
- November 2012 (2,493)
- October 2012 (3,246)
- September 2012 (3,469)
- August 2012 (62)