[go-nuts] Syntactic Sugar Idea for Go 2.0: until/unless, and postfix conditionals

2020-11-02 Thread Jeffrey Paul
een in Perl and Ruby for ages, and, more recently, CoffeeScript had it for a moment, but it didn't make it over into ES with the other notable features from it. I think it's a lovely convenience without changing the operation of the language itself. Best, -sneak -- Jeffrey Paul - s

[go-nuts] Re: WebP encoder

2018-12-29 Thread Jeffrey
since the libwebp has released the version 1.0.0, so it's time to port it to pure golang -- 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 to golang-nuts+unsubscr...@

[go-nuts] Re: WebP encoder

2018-12-28 Thread Jeffrey
any update? need pure go implement for webp encoder indeed > > -- 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 to golang-nuts+unsubscr...@googlegroups.com. For more

Re: [go-nuts] JSON dynamic keys

2018-12-03 Thread Jeffrey Smith
That is 99% of what I'm after cheers. I need to be able to set the _doc bit to be any random string if possible as its the type name. `json:"_doc"` On Monday, December 3, 2018 at 3:53:34 PM UTC, Burak Serdar wrote: > > On Mon, Dec 3, 2018 at 8:27 AM Jeffrey Smith >

[go-nuts] JSON dynamic keys

2018-12-03 Thread Jeffrey Smith
I'm trying to set mapping in elastic search in go and want to generate something like this. { "mappings": { "_doc": { "properties": { "title": { "type": "text", "store": true }, "date": { "type": "date", "store": true }, "content": { "type": "text" } } } } } The _doc, title,date and content a

Re: [go-nuts] Why can runtime.procyield declare its argument stack size to be zero?

2018-10-16 Thread Jeffrey Baker
Thanks. Now I feel a bit less crazy. -jwb On Tue, Oct 16, 2018 at 5:14 PM Ian Lance Taylor wrote: > On Thu, Oct 11, 2018 at 3:01 PM, Jeffrey Baker wrote: > > > > I'm trying to learn how to safely use this asm, and I don't understand > some > > of the existing

[go-nuts] Why can runtime.procyield declare its argument stack size to be zero?

2018-10-11 Thread Jeffrey Baker
I'm trying to learn how to safely use this asm, and I don't understand some of the existing asm in the runtime package. From amd64.s: TEXT runtime·procyield(SB),NOSPLIT,$0-0 MOVL cycles+0(FP), AX My understanding of $0-0 is it's supposed to indicate the sizes of the arguments, in this case wou

Re: [go-nuts] Re: First time building a rest-api-based web app: general security-related questions

2018-01-25 Thread Jeffrey Goldberg
lish that, but its on our wishlist of stuff we would someday like to publish. Cheers, -j –- Jeffrey Goldberg Chief Defender Against the Dark Arts @ AgileBits https://1password.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] base32 DecodeLen() miscalculation when no padding

2017-12-12 Thread Jeffrey Goldberg
> On Dec 12, 2017, at 9:00 AM, Ian Lance Taylor wrote: > DecodedLen is supposed to be applied to the length of the encoded > data. RFC 4648 says that the encoded data must be padded to be a > multiple of 8 bytes. Yet encoding/hash32 defines a NoPadding constant, the code is filled with tests

[go-nuts] dynamic xml

2017-10-18 Thread Jeffrey Smith
I have a lot of XML documents that have sections in that contain tags that can be of any name but will contain type,minOccurs,maxOccurs and have a description inside it. For instance name,description,definition and id below. description number1 user graphCreate API

Re: [go-nuts] Unmarshal multiple similar XML Files

2017-08-31 Thread Jeffrey Smith
Thanks a lot for that, simplifies my code massively :-) -- 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 to golang-nuts+unsubscr...@googlegroups.com. For more options

[go-nuts] Unmarshal multiple similar XML Files

2017-08-31 Thread Jeffrey Smith
I'm trying to Unmarshal multiple XML files that have differing top level elements but the rest of the document is identical. ... ... I have tried adding multiple tags in the struct but it only ever uses the first one. type EspFlowCodeOperation struct { XMLName xml.Name `xml

[go-nuts] Re: Serve large files

2017-02-28 Thread Jeffrey Smith
).Set("Content-Disposition", "attachment;filename=large.txt") io.Copy(w, streamPDFbytes) } On Tuesday, February 28, 2017 at 11:34:04 AM UTC, Jordan Krage wrote: > > Try using os.Open to get a *File (which implements io.Reader), and then > io.Copy to the response f

[go-nuts] Serve large files

2017-02-28 Thread Jeffrey Smith
I'm trying to server up a file that can be very large so would like to try and stream the content back. package main import ( "bytes" "fmt" //"io" "io/ioutil" "log" "net/http" ) func main() { http.HandleFunc("/", serverFile) if er

[go-nuts] AST to parse contents of Structs

2017-01-27 Thread Jeffrey Smith
I'm trying to use the ast and parse packages to find the fields in two separate structs one that will be called Inputs and the other Outputs. these can change but as an example i'm trying to parse these package main import ( "fmt" ) type Inputs struct { Name string `json:"name"`

Re: [go-nuts] Re: Golang upgrade from 1.5 to 1.7.2

2016-08-23 Thread Jeffrey
+1 https://github.com/samuel/go-zookeeper. already used in PRO env. 在 2016年8月24日星期三 UTC+8上午7:27:56,Matt Harden写道: > > You're right of course. I was thinking of > https://github.com/samuel/go-zookeeper. > > On Tue, Aug 23, 2016 at 4:04 PM Prateek Gaur > wrote: > >> BTW this thing worked fine in

[go-nuts] http2 questions

2016-08-10 Thread Jeffrey Smith
I have been playing around with http2 in the latetst 1.7RC today and had a few questions I still had to import "golang.org/x/net/http2" and then set http2.ConfigureTransport to actually use http2 when creating a client. I was under the impression this was fixed or was I wrong? https://github.