eclipse-scala-go

eclipse-scala-go


0 answers

How to react to keypress events in Go?

I have a REPL app in Go that should react to keyboard press events (distinct action for each key pressed key) but ReadString expects for return key to be pressed before reading os.Stdin: import ( ...

2 answers

Map and Dynamic Programming Updating

The problem I am given is A child is running up a staircase with n steps, and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways the child can ...

2 answers | 1 hour ago by user2671513 on Stack Overflow stackoverflow.com
0 answers

appengine cloud storage compile error in demo project

Following https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/getstarted fails when deploying goapp deploy -oauth with app.go:78: cannot use google.AppEngineContext(c) (type ...

1 answer

Google App Engine mail.Send returns “TypeError: unhashable instance” in python2.7/smtplib.py

I am trying to locally send mail via Google App Engine Development Server: dev_appserver.py --show_mail_body true --smtp_host=xxx --smtp_port=25 --smtp_user=xxx --smtp_password=xxx app.yaml if err ...

2 answers

Golang read from pipe reads tons of data

I'm trying to read an archive that's being tarred, streaming, to stdin, but I'm somehow reading far more data in the pipe than tar is sending. I run my command like this: tar -cf - somefolder | ...

2 answers | 4 hours ago by ash on Stack Overflow stackoverflow.com
1 answer

how to get the method fields of a typed function (Go)

I'm wondering if it's possible to get the method fields from a typed function using reflection or by other means. The problem that I'm trying to solve is that I have a method which accepts a ...

1 answers | 4 hours ago by The user with no hat on Stack Overflow stackoverflow.com
1 answer

golang TCPConn.SetWriteDeadline doesn't seem to work as expected

I'm trying to detect sending failures by inspecting the error returned by golang TCPConn.Write, but it's nil. I also tried using TCPConn.SetWriteDeadline without success. That's how things happen: ...

1 answer

How to mark message as unread in go?

I wanna to mark message by IMAP as unread in go. I don't know, what parameters give to "Replace" function. I'm using http://godoc.org/github.com/mxk/go-imap/imap It's my code: set, _ := ...

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

Getting Content-Type header for uploaded files processed using net/http request.ParseMultipartForm

I'm using the net/http package to write a server that, among other things, receives a files uploaded via POST with the multipart/form-data encoding. Working my way through the net/http docs, I've ...

1 answer

Creating new ldap entry with go

I'm creating an application that needs to add a new ldap entry in openDJ. I can think of two possible solutions currently: Use template to create ldif file, then File.Write to place it in a ...

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

How to implement CLI client to golang daemon?

I have a linux daemon with http api which I have wrote on golang. At start he initialize variables and all time when I ask api - he is answer. Init is hard operation: read many config's, add many ...

0 answers

go install : directory outside of GOPATH

I've just installed Go and I can't get my go install working. I followed a tutorial on YouTube to write a HelloWorld.go app but I keep getting the error: go install: no install location for directory ...

0 answers

Go language strange behavior by handling templates

gotemplates Hello! I'm learning Go language now and trying to port some simple WEB code (Laravel 4). Everything was well, until I tried to reproduce Blade templates into text templates. I found that ...

1 answer

How to implement the file system?

I need write program which will mount(work) with all type of fyle system. In linux you can mount the different file systems. And each file system has parameters, some number of "folders" and even the ...

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

Go read text with goroutine

I want to read text file with goroutines. The order of text that gets read from a file does not matter. How do I read a file with concurrency? scanner := bufio.NewScanner(file) for scanner.Scan() { ...

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

Better (general) auth implementation

Currently I have a method in my BaseController and in each controller method that I need the user to be authenticated I am left with always calling this piece of code: user, err := c.getUser() if err ...

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

Check fingerprints of server SSL/TLS certificates in http.NewRequest

How can I check the fingerprints of the server SSL/TLS certificates during a http request in golang? This ruby code shows what I want to do in Go: @verify_callback = proc do |preverify_ok, ...

1 answers | 8 hours ago by mattes on Stack Overflow stackoverflow.com
3 answers

WebP encoder/decoder in go

Is there somewhere a complete WebP encoder and decoder compatible with current weekly (or forkable)? Is it comparable in speed to the standard png one ?

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

Go support for GitHub

In Go, there is the practice that if you create a project that is stored on GitHub, to use a folder name that is: ./src/github.com/<user>/<repo> When I now run go get, Go knows how to ...

1 answers | 10 hours ago by Golo Roden on Stack Overflow stackoverflow.com
1 answer

Missing condition in if statement error in go lang

I have this if statement that is not evaluating correctly: // Take advantage of Boolean short-circuit evaluation if h != 2 && h != 3 && h != 5 && h != 6 && h != 7 ...

1 answers | 10 hours ago by Varun on Stack Overflow stackoverflow.com
1 answer

How do I deploy a Go application to Heroku with main package in subdirectory?

I am currently trying to deploy a Go application to Heroku using wercker. Heroku expects the main.go to be at the repository root directory but if possible I would like my repository directory to look ...

1 answers | 10 hours ago by Marcus on Stack Overflow stackoverflow.com
1 answer

golang POST data using the Content-Type multipart/form-data

I'm trying to upload images from my computer to a website using go. Usually, I use a bash script who send file a key to the serveur: curl -F "image"=@"IMAGEFILE" -F "key"="KEY" URL it's work fine, ...

2 answers

How would I limit upload and download speed from the server in golang?

How would I limit upload and download speed from the server in golang? I'm writing a golang server to allow users to upload and download files. And file is big, about 1GB bytes. I want to limit the ...

2 answers

Encoding/decoding XML root token with XMLNS declaration in golang

I am attempting to encode and decode an XML token in Go using the encoding/xml package. The XML token in question has a namespace, an xmlns attribute, and a namespace declaration for the namespace on ...

2 answers | 13 hours ago by Sam Whited on Stack Overflow stackoverflow.com
0 answers

How to add external package to golang in openshift

how would I install github.com/gorilla/mux in openshift running golang. I know locally we do go get and go install. What is the equivalent for openshift. The code given works fine on my computer. But ...

14 hours ago by n.r on Stack Overflow stackoverflow.com
2 answers

go install creates directory os_arch - select different output directory

I have this folder structure for my fib package: $ tree . └── src └── fib ├── fib │   └── main.go ├── fib.go └── fib_test.go (main.go is in package main, ...

2 answers | 14 hours ago by topskip on Stack Overflow stackoverflow.com
1 answer

Is it possible to get Enum name without creating String() in Golang

Is it possible to get Enum name without creating func (TheEnum) String() string in Golang? const ( MERCURY = 1 VENUS = iota EARTH MARS JUPITER SATURN URANUS NEPTUNE PLUTO ) or is there a ...

1 answers | 15 hours ago by Kokizzu on Stack Overflow stackoverflow.com
2 answers

Go workspace vs custom folder structure

I'm currently learning Go, and I have learned that Go suggests (expects? enforces?) that you use a specific folder layout for your workspace: - my-go-workspace - src - bin - pkg I perfectly ...

2 answers | 16 hours ago by Golo Roden on Stack Overflow stackoverflow.com
1 answer

Can I use Goroutines in Google App Engine?

Can I use Goroutines in Google App Engine? The following example seems to work, but can I use it? My goal is to do some very light background processing (whereas an actual task queue job feels too ...

1 answers | 17 hours ago by mattes on Stack Overflow stackoverflow.com
2 answers

Handle dependencies in Go

In Go, if you reference another package, e.g. something on GitHub, then Go always gets the latest version from the master branch. While this is great for development, I guess it's a problem in ...

15 30 50 per page
1 2 3