eclipse-scala-go

eclipse-scala-go


1 answer

LiteIDE debug message No executable specified use target exec

Try to debug In LightIde, . However, when I start debug, the following console message appear (gdb) 10000015^error,msg="No symbol table is loaded. Use the \"file\" command." (gdb) ...

1 answers | 8 mins ago by user3800460 on Stack Overflow stackoverflow.com
2 answers

Function Over Loading in GO using interfaces

I have a "main type" and a "sub-type" is embedded in that.Both main and sub implements an interface. When I'm assigning a 'main type' variable to interface type variable and call implemented method …

2 answers | 1 hour ago by faisal k k on Stack Overflow stackoverflow.com
2 answers

Revel framework and Go code completion

is is possible to use Revel framework with Go code completion support. As far as i know the gocode utility requires the code to be compiled into a library into a pkg subfolder in order to function, …

1 answer

OAuth2 in Go with Google App Engine

I'm looking into using OAuth2 with Go in Google App Engine. Here is a link with an example: https://developers.google.com/appengine/docs/go/users/#Go_OAuth_in_Go But this remark isn't clear to me: …

1 answer

Google App Engine Golang datastore.Query.GetAll not working locally

I am new to Google App Engine and meet some problems with datastore. I wrote a test GaeDatastore_test.go to test datastore.Query.GetAll method see below package persist import ( "fmt" ...

1 answers | 3 hours ago by Keyang on Stack Overflow stackoverflow.com
1 answer

Golang: goroutine infinite-loop

When an fmt.Print() line is removed from the code below, code runs infinitely. Why? package main import "fmt" import "time" import "sync/atomic" func main() { var ops uint64 = 0 …

1 answers | 3 hours ago by xged on Stack Overflow stackoverflow.com
1 answer

Batch JSON-RPCs in Go with Gorilla RPC

Okay, so I'm working a server. It serves webpages and provides other services. package main import ( "fmt" "log" "net/http" "github.com/gorilla/rpc" ...

1 answers | 6 hours ago by 425nesp on Stack Overflow stackoverflow.com
2 answers

Public names in an executable (“main” package)

As I understand it, names that are capitalized are exported (public) when the package is imported. However, since executables ("main" packages) are run instead of being imported by other packages, …

2 answers | 6 hours ago by darkfeline on Stack Overflow stackoverflow.com
1 answer

Does conn.SetDeadline() close the connection if it times out

I have a Golang project that utilizes conn.SetDeadline(). If a an EOF error is thrown because a read timed out, does Go automatically close the connection? I have a setup where I need to wait a ...

1 answers | 7 hours ago by user1772510 on Stack Overflow stackoverflow.com
1 answer

How to unmarshal json in golang when left part is a number

I'd like to unmarshal a json like this in the code. But this code doesn't work. Any suggestions? Thx! PS. playground here http://play.golang.org/p/m2f94LY_d_ package main import "encoding/json" ...

1 answers | 8 hours ago by Hermione on Stack Overflow stackoverflow.com
1 answer

Parse formatted string in Golang

I'm trying to parse a GNSS RINEX file using Golang. For example, here's the RINEX specification for the VERSION line: +--------------------+------------------------------------------+------------+ …

1 answers | 9 hours ago by hankivstmb on Stack Overflow stackoverflow.com
2 answers

Golang template ignore if no match

I am trying to convert a golang template, and allow ignoring if the match is not found. Is that possible? Playground package main import ( "bytes" "fmt" "text/template" ) type Person struct { Name …

2 answers | 10 hours ago by aminjam on Stack Overflow stackoverflow.com
2 answers

How to Get Form Input as Float64 in Go

I have a webform built using Go. Users enter a number, then I need to do some math on that number. It seems like all methods using http package use strings as the output. How can I do simple math …

2 answers | 11 hours ago by jjgames on Stack Overflow stackoverflow.com
6 answers

reading file line by line in go

I'm unable to find 'file.ReadLine' function in go! I can figure out how to quickly write one, but just wondering if I'm overlooking something here. How does one read a file line by line?

6 answers | 14 hours ago by g06lin on Stack Overflow stackoverflow.com
1 answer

In Go, why does “File.Readdirnames” make a “clock_gettime” system call?

As a follow up to this question, I am trying to write a Go program that only lists a files name in an efficient matter without unnecessary system calls. This is what I have thus far: package main …

1 answer

Golang html output is being interpreted as plain text instead of being received as html

I'm sure this is just something dumb I'm doing, but I'm new to Go, so not sure what's going on here. I have the following basic setup. requestHandler := http.HandlerFunc(func(w http.ResponseWriter, …

3 answers

Go/GoLang store Binary data in MySQL

I'm using the MySQL driver from http://github.com/go-sql-driver/mysql I need to store the binary representation of an IP address in MySQL in a BINARY(4) column. To do this, I've tried: ...

3 answers | 15 hours ago by Allison A on Stack Overflow stackoverflow.com
1 answer

Communication with other Go process

I have a program that reads a filename from the console and executes go run filename.go. // main.go package main import ( "bufio" "fmt" "log" "os" "os/exec" ) func main() { …

1 answer

What is the maximum time.Time in Go?

I'm looking for documentation on the Max time.Time in go. Other languages make it explicit, for example in C#: http://msdn.microsoft.com/en-us/library/system.datetime.maxvalue(v=vs.110).aspx public …

1 answers | 16 hours ago by Chris Weber on Stack Overflow stackoverflow.com
2 answers

Go - How do I set multi-value HTTP headers, like Content-Security-Policy?

I'm trying to set the Content-Security-Policy header on a http.ResponseWriter object. This is a header with multiple values. My problem is that all the methods for http.Header take a single key and a …

1 answer

Read request payload in Go?

I'm using a file uploader and need details from the request payload to crop it. func Upload(w http.ResponseWriter, r *http.Request) { reader, err := r.MultipartReader() if err != nil { …

1 answers | 18 hours ago by iksose on Stack Overflow stackoverflow.com
0 answers

mgo Best approach to populate references in structs

i have a struct: type Warehouse struct { Id bson.ObjectId `bson:"_id,omitempty"` Name string Street string Nr string Zip string Country string …

1 answer

Golang enclosure rule for csv parsing

I have the following problem. I have to read csv files that are delimited by '|', and some fields have large json strings in which some contain '|'. The fields are enclosed in single-quotes. How can I …

1 answers | 19 hours ago by dan89 on Stack Overflow stackoverflow.com
1 answer

Golang http Get empty response.Body

I am running into a problem that for certain urls, code in Golang is not retrieving the expected content. I am not posting the actual url, but it has this form and is a link to a google drive file ...

1 answers | 21 hours ago by Keiga on Stack Overflow stackoverflow.com
1 answer

How to detect time in Go?

I need to parse the date_id field from emails headers. However these seem to have slightly different layouts so I've started to build a switch case/block . I'm wondering if that's really the way to …

1 answers | 22 hours ago by hey on Stack Overflow stackoverflow.com
1 answer

Psi Function (“digamma”) in golang

I've been searching for a scientific computing library for golang that implements the digamma function, which is the logarithmic derivative of the gamma function. I've attempted to implement the ...

1 answers | 23 hours ago by sinwav on Stack Overflow stackoverflow.com
0 answers

Crumb with Golang's net/http header

I was adding crumb CSRF protection support as part of the Golang code I wrote for interacting with Jenkins RESTful API (https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API) struct: type …

1 answer

Golang compile for all platforms in Windows 7 (32 bit)

I'm using windows 7 [32 bit] operating system. I'm build example go program. I want to compile this program for all platforms from my windows 7 [32 bit] OS. I want to compile my program for all ...

1 answer

How to validate UUID v4 in Go?

I have the following piece of code: func GetUUIDValidator(text string) bool { r, _ := regexp.Compile("/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/") return ...

1 answers | yesterday by Roberto Santelices on Stack Overflow stackoverflow.com
1 answer

golang way to do inheritance, the workaround

I understand golang does not support inheritance, but what is the right way to do in go for the following? type CommonStruct struct{ ID string } type StructA struct{ CommonStruct FieldA ...

1 answers | yesterday by John Z on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3