Re: [go-nuts] ANN: A HTTP backed File System (FUSE)

2016-12-06 Thread James Mills
On Mon, Dec 5, 2016 at 6:04 AM, Vasiliy Tolstov wrote: > This is very useful, but does it possible to specify multiple url for > the same object? For example i have two servers with identical content > and want to serve it via fs. If one server is down all works from > other.. Also suitable for l

[go-nuts] Re: ANN: A HTTP backed File System (FUSE)

2016-12-06 Thread omarshariffdontlikeit
Sounds great! As someone who has tried to work with WebDAV on multiple occasions, its so horribly broken/unsupported/deliberately sabotaged as to be useless anyways, which is a shame because I really really like WebDAV :( At least your project has a chance of actually working. On Tuesday, Dece

[go-nuts] Union/Sum Types and Lint tool to check missing cases in a type switch

2016-12-06 Thread haya14busa
Hi! I created a linter to check missing cases in a type switch. https://github.com/haya14busa/gosum I wrote a blog post about this tool and how to represent sum type in Go. Sum/Union/Variant Type in Go and Static Check Tool of switch-case handling https://medium.com/@haya14busa/sum-union-varian

[go-nuts] Go API with Echo framework - Code feedback

2016-12-06 Thread bastian . freelance
Hey people, I am coming from a JavaScript background (mostly Node) and fall in love with Go when I first experimented with it. As I developed my first API, it felt strange on many places, since I am still having a NodeJS mindset and it's hard to wrap my head around best practices in Go. My Code

[go-nuts] help w/ go get -u on windows

2016-12-06 Thread Robert Solomon
Hi. I am learning go and having trouble on a win10-64 bit computer. go get -u github.com/nsf/termbox-go missing git command -- 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 it, send

[go-nuts] Re: help w/ go get -u on windows

2016-12-06 Thread Robert Solomon
Nevermind. I figured it out. On Tue, Dec 6, 2016 at 10:14 AM, Robert Solomon wrote: > Hi. I am learning go and having trouble on a win10-64 bit computer. > > go get -u github.com/nsf/termbox-go > > missing git command > -- You received this message because you are subscribed to the Google G

[go-nuts] Isn't the use of Context in db/sql non-diomatic?

2016-12-06 Thread Chandru
Documentation of the context package says, "Use context Values only for request-scoped data that transits processes and APIs, not for passing optional parameters to functions." sql.BeginContext introduced in 1.8, uses Context to receive options like IsolationLevel and read-only flag. These are ne

[go-nuts] A quick question about allocations when creating interface{} values

2016-12-06 Thread Francis
Today I was exploring some unexpected allocations that came from creating empty interface{} values wrapping a string and an int. I spent some time trying to clarify my understanding so I wouldn't be surprised in the future. I have consulted this excellent page http://research.swtch.com/interfac

[go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-06 Thread paraiso . marc
Either the doc should be changed or the std lib should follow the spirit of the doc. But my understanding is that context.Context is not just about HTTP request/response cycle but deals with anything that needs cancellation or a resource clean up signal , some kind of DIY RAII . In any case the

Re: [go-nuts] A quick question about allocations when creating interface{} values

2016-12-06 Thread Ian Lance Taylor
On Tue, Dec 6, 2016 at 8:08 AM, Francis wrote: > Today I was exploring some unexpected allocations that came from creating > empty interface{} values wrapping a string and an int. I spent some time > trying to clarify my understanding so I wouldn't be surprised in the future. > > I have consulted

[go-nuts] Re: panic: plugin.Open: plugin was built with a different version of package runtime

2016-12-06 Thread sdickey
Experiencing the same sort of issues. On Saturday, November 19, 2016 at 3:31:54 PM UTC-6, con...@theninjabunny.com wrote: > > I'm not sure what I'm doing wrong or if I understood at all the plugin > package of 1.8 > > > I have a plugin like the example exampleplugin/main.go (build with "go > b

[go-nuts] The issue with "Writing Web Applications"

2016-12-06 Thread Simon Gorbunkov
A newbee here. Is this a right place to ask/report an issue on the tutorial "Writing Web Applications"? Thanks in advance. -- 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 it, send an

Re: [go-nuts] The issue with "Writing Web Applications"

2016-12-06 Thread Shawn Milochik
Just ask. People here are generally very helpful and friendly. If the question should be redirected elsewhere I'm sure someone will tell you, but they can't help you with that until they know what the question/issue is. -- You received this message because you are subscribed to the Google Group

Re: [go-nuts] The issue with "Writing Web Applications"

2016-12-06 Thread 'Anmol Sethi' via golang-nuts
Yes, this is the correct place. On Tue, Dec 6, 2016 at 4:31 PM Shawn Milochik wrote: > Just ask. People here are generally very helpful and friendly. > > If the question should be redirected elsewhere I'm sure someone will tell > you, but they can't help you with that until they know what the >

[go-nuts] ANN: sshego, an easy to use ssh tunneling library

2016-12-06 Thread Jason E. Aten
https://github.com/glycerine/sshego from the README: sshego, a usable ssh library for Go executive summary Google's "golang.org/x/crypto/ssh" library offers a fantastic full implementation of the ssh client and server protocols. However this library is minimalistic by design, cumbersom

[go-nuts] Strange, intermittent panic issues

2016-12-06 Thread brikis98
Hi folks, We're using Go to write an open source CLI tool called terragrunt . We cross-compile binaries for the tool for multiple OS's. Some of the users are reporting intermittent crashes due to mysterious panic errors. Here are two examples: - h

[go-nuts] Unmarshal into struct where root struct field is a dynamic field

2016-12-06 Thread vanmulders1992
An example JSON response : Query : /id/123456 Response : {"123456":{"id":123456,"name":"qsdsdqsdqsd","profileIconId":23}} The root struct field is a dynamic field based of the parameter I queried? Is is possible to unmarshal to a struct or should I use map[string] approach and dig a level

[go-nuts] Strange, intermittent panic issues

2016-12-06 Thread Tamás Gulácsi
Compile with -race flag, and run that binary, and "go test -race", to eliminate the most possible reason: data race. -- 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 it, send an email

[go-nuts] Re: Strange, intermittent panic issues

2016-12-06 Thread rlh
0xb01dfacedebac1e is a poison pill that usually indicates misuse of unsafe.Pointer. If there is any use of unsafe.Pointer or CGO in the program that would be a good place to start looking. You can google "0xb01dfacedebac1e" for more details. On Tuesday, December 6, 2016 at 5:00:37 PM UTC-5,

[go-nuts] HTTP server triggers 'Access-Control-Allow-Origin' header contains multiple values error

2016-12-06 Thread paul . h . breslin
We have a simple http service running using the net/http package and I tried setting the Access-Control-Allow-Origin header value as in: w.Header().Set("Access-Control-Allow-Origin", "*") and when I do so the client side gets an error: "The 'Access-Control-Allow-Origin' header contains multiple

Re: [go-nuts] A quick question about allocations when creating interface{} values

2016-12-06 Thread Francis
Thanks Ian, I should have noted that I was asking about a specific version of a specific Go compiler :) That is very interesting info about the functions, maps and channels. I'll have a bit more of a look around. On Tuesday, 6 December 2016 18:50:42 UTC+1, Ian Lance Taylor wrote: > > On Tue, De

[go-nuts] Problem with slice and object copy

2016-12-06 Thread Paulo Coutinho
Hi, In my project i have a slice of Healthcheck objects. On each second i make range on it healthcheck list to process. But when i get the object inside range, it change the pointer address, it makes a copy of the healthcheck, what is a problem to me. Can anyone help me get the current object

[go-nuts] Re: HTTP server triggers 'Access-Control-Allow-Origin' header contains multiple values error

2016-12-06 Thread paul . h . breslin
Further to this... it seems the request origin is being "Add"ed to the header sometime after our handler gets called. I tried doing a "Del" on the key before calling "Set" but this made no difference. -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

[go-nuts] Re: Problem with slice and object copy

2016-12-06 Thread Volker Dobler
Am Dienstag, 6. Dezember 2016 23:40:26 UTC+1 schrieb Paulo Coutinho: > > [...] > Can anyone help me get the current object inside the slice on range? > Either: Do not copy hcList[i] (and use it directly). Or: There is no problem as you are printing the address of the pointer to your Healthcheck:

[go-nuts] Re: Problem with slice and object copy

2016-12-06 Thread Paulo Coutinho
No more problems. The problem is with me that dont update the list to server app and remain with the old list. But thanks. The project is updated with optimizations here: https://github.com/prsolucoes/gohc Thanks. On Tuesday, December 6, 2016 at 8:40:26 PM UTC-2, Paulo Coutinho wrote: > >

[go-nuts] Re: Go @ Work

2016-12-06 Thread Lars Lehtonen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > On Saturday, 31 March 2012 00:27:36 UTC+7, hcatlin wrote: >> >> Just thought I'd stop in and post something saying "hi" to the group. Kiswono Prayogo wrote: > > Hi, if I may ask, what language do your company previously use before > switch to Go

[go-nuts] Struct Compatibility in unix.Syscall

2016-12-06 Thread Steven Logan
I am trying to interact with devices using the V4L2 API. The API defines the following struct typedef __u64 v4l2_std_id struct v4l2_input { __u32 index; __u8 name[32]; __u32 type; __u32 audioset; __u32tuner; v4l2_std_id std; __u

[go-nuts] How to create self-signed certificate with custom extension?

2016-12-06 Thread tamal
HI, I am trying to create a self-signed certificate with some custom data encoded as a custom extension. From the x509 doc, https://golang.org/pkg/crypto/x509/#CreateCertificate "CreateCertificate creates a new certificate based on a template. The following members of template are used: SerialN

Re: [go-nuts] Struct Compatibility in unix.Syscall

2016-12-06 Thread 'Paul Borman' via golang-nuts
Are the extra 4 bytes padding at the end of the structure? You can have C print the offset of each element and then use unsafe.Offsetof to find the same for the Go structure. I am sure you will quickly discover where the extra 4 bytes are (the C structure is probably padding to a word boundary or

[go-nuts] How to interpret scheduler latency profile

2016-12-06 Thread yapingshi
Hi, I'm trying to understand what scheduler latency means. Based on the attached profile (sorry I can't share the source code), can you help suggest what are the possible reasons for the biggest delays (e.g. sendToResultChan, reflect.Select)? What are the potential/possible solutions? thanks

[go-nuts] Rfc2898DeriveBytes vs golang pbkdf2

2016-12-06 Thread tuanhoanganh
Here is my C# Rfc2898DeriveBytes using System;using System.Text;using System.Security.Cryptography; public class Program{ public static void Main() { byte[] saltBytes = Encoding.Unicode.GetBytes("47687"); Console.WriteLine(Convert.ToBase64String(saltBytes)); byte[]

[go-nuts] Re: Rfc2898DeriveBytes vs golang pbkdf2

2016-12-06 Thread tuanhoanganh
Here is my golang, it working http://stackoverflow.com/questions/41008725/rfc2898derivebytes-vs-golang-pbkdf2/41009043#41009043 On Wed, Dec 7, 2016 at 10:07 AM, tuanhoanganh wrote: > Here is my C# Rfc2898DeriveBytes > > using System;using System.Text;using System.Security.Cryptography; > public

[go-nuts] Re: Strange, intermittent panic issues

2016-12-06 Thread brikis98
> > 0xb01dfacedebac1e is a poison pill that usually indicates misuse of > unsafe.Pointer. If there is any use of unsafe.Pointer or CGO in the program > that would be a good place to start looking. > Interesting. As far as I know, we don't use unsafe.Pointer or cgo anywhere in the code, but I'l

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-06 Thread Chandru
I can understand db/sql using Context for cancellation. It is the optional arguments to BeginContext like IsolationLevel and read-only flag, which are not request-specific, that seem to contradict context's documentation. -- Chandra Sekar.S On Tue, Dec 6, 2016 at 9:50 PM, wrote: > Either the do

[go-nuts] Re: Strange, intermittent panic issues

2016-12-06 Thread Dave Cheney
On Wednesday, 7 December 2016 12:52:17 UTC+9, brik...@gmail.com wrote: > > 0xb01dfacedebac1e is a poison pill that usually indicates misuse of >> unsafe.Pointer. If there is any use of unsafe.Pointer or CGO in the program >> that would be a good place to start looking. >> > > Interesting. As fa

[go-nuts] Re: HTTP server triggers 'Access-Control-Allow-Origin' header contains multiple values error

2016-12-06 Thread Ain
kolmapäev, 7. detsember 2016 0:30.12 UTC+2 kirjutas paul.h@gmail.com: > > We have a simple http service running using the net/http package and I > tried setting the Access-Control-Allow-Origin header value as in: > > w.Header().Set("Access-Control-Allow-Origin", "*") > > and when I do so the

[go-nuts] Trouble with fonts

2016-12-06 Thread Lucio
The first issue is one of documentation. It says in that: DrawBytes draws s at the dot and advances the dot's location. But it leaves the question of what exactly those bytes are supposed to represent. Line 132 in