[go-nuts] time.Now.UnixNano() incorrect under windows7?
I ran into time issues on Windows, too: https://groups.google.com/forum/m/#!topic/golang-nuts/W5MqeB1Ai_k -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Re: I am starting Golang and I am looking for a example to Login, Logout, Signup..
Hi, I have few examples that I developed. Here is the link: https://github.com/sandeepkalra/mv-backend/ The auth module shows what you are looking for Thanks, Sandeep Kalra On Tuesday, March 19, 2019 at 7:50:19 PM UTC-4, HENRI KNAFO wrote: > > Let me first tell you I am new to Golang. > > I am looking for the code of an example web application with a simple > Login, Logout, Signup page (With or without social network login). I tried > google and nothing conclusive came out. > Obviously I need something to protect against CSRF, hashed password, ect). > > I am surprise I have trouble finding this since any one starting a project > needs this now a days. > > anyone knows where I can find this? > > -- 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, visit https://groups.google.com/d/optout.
Re: [go-nuts] [ANN] PipeHub: A programmable proxy server
Hi Marko, Glad that you liked. I'll be posting on this topic new releases of the project. Also gonna take a look at the proxy you linked. Em sábado, 23 de março de 2019 19:07:38 UTC, Marko Ristin escreveu: > > Hi Diego, > Thanks for sharing, looks very interesting! Please keep us posted and let > us know when it's production-ready. > > We also implemented a simple reverse proxy at the company since we wanted > it to be easy to automatically set up and configure. This helped us to add > a simple reverse proxy to microservices running on each instance (and we > have a lot of instance that are deployed automatically). Beforehand we > tried with nginx and maintaining many custom deployments turned out to be a > very complex devop task. > > While you pursue a bit different goal, have a look at what a minimalist > reverse proxy had to fulfill for us: > https://github.com/Parquery/revproxyry > > Cheers, > Marko > > Le sam. 23 mars 2019 à 18:30, Diego Bernardes > a écrit : > >> Hi, >> >> For the past weeks, I've been working in a personal project that I wanted >> to do for a long time. Is a programmable proxy. >> >> Load balancer, API Gateway, Cache, TLS termination, and so on, are all >> example of servers that run on typical stack. But why we need to run all >> these servers? Wouldn't be better having all this logic into a single >> server? And this is the core idea of this project. >> >> The idea is to enable deep customizations at the request path. This >> customization is done by injecting Go packages, called pipe, to handle the >> request. >> >> Everything is at a very early stage. I'm gonna focus now on the little >> and important things like the docs, logs, and metrics. >> >> >> Would love to hear your options and suggestions. >> >> https://github.com/pipehub/pipehub >> >> -- >> 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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Re: brotli: my c2go experience
Now for some benchmarks. I wrote a simple benchmark program that compares my pure Go brotli package with cbrotli (the cgo wrapper in the standard brotli repo) and with compress/gzip. Here are the results for compressing Newton’s Opticks (from the testdata directory of the Go source tree): brotli-037.9% 10.611264ms 51.0 MB/s brotli-133.9% 12.440498ms 43.5 MB/s brotli-232.2% 32.232898ms 16.8 MB/s brotli-331.8% 32.788896ms 16.5 MB/s brotli-431.0% 41.686392ms 13.0 MB/s brotli-529.0% 52.108321ms 10.4 MB/s brotli-628.4% 61.75893ms 8.8 MB/s brotli-727.9% 77.842721ms 6.9 MB/s brotli-827.7% 101.626643ms5.3 MB/s brotli-927.5% 118.482597ms4.6 MB/s brotli-10 25.6% 897.835046ms0.6 MB/s brotli-11 25.0% 2.13944223s 0.3 MB/s cbrotli-0 37.9% 9.664506ms 56.0 MB/s cbrotli-1 33.9% 11.348875ms 47.7 MB/s cbrotli-2 32.2% 29.9876ms 18.0 MB/s cbrotli-3 31.8% 36.219238ms 14.9 MB/s cbrotli-4 31.0% 44.791383ms 12.1 MB/s cbrotli-5 29.0% 57.329373ms 9.4 MB/s cbrotli-6 28.4% 58.928917ms 9.2 MB/s cbrotli-7 27.9% 76.804601ms 7.0 MB/s cbrotli-8 27.7% 100.928546ms5.4 MB/s cbrotli-9 27.5% 122.621637ms4.4 MB/s cbrotli-10 25.6% 916.783042ms0.6 MB/s cbrotli-11 25.0% 2.091093825s0.3 MB/s gzip-1 38.5% 9.548712ms 56.6 MB/s gzip-2 34.9% 11.672584ms 46.3 MB/s gzip-3 34.1% 14.940402ms 36.2 MB/s gzip-4 31.9% 15.40793ms 35.1 MB/s gzip-5 30.9% 25.36402ms 21.3 MB/s gzip-6 30.7% 31.563463ms 17.1 MB/s gzip-7 30.6% 37.404353ms 14.5 MB/s gzip-8 30.6% 45.647576ms 11.8 MB/s gzip-9 30.6% 47.600027ms 11.4 MB/s > On Mar 16, 2019, at 3:55 PM, Andy Balholm wrote: > > Over the last few months, I’ve been working (on and off) at translating the > Brotli compression library into Go. (The result is at > github.com/andybalholm/brotli.) I’d like to share what I’ve learned. > > I tried various tools: rsc/c2go, elliotchance/c2go, Konstantin8105/c4go, and > a tool that I developed myself (leaven). I kept coming back to rsc/c2go > because it produces the cleanest, most readable output. But I was frustrated > by its limitations; there are so many C constructs that it can’t handle. > > Finally I realized that the only way a C-to-Go transpiler can produce > readable output is to limit itself to the subset of C that maps to Go fairly > cleanly. And the way to deal with that is to progressively refactor the C > project into that subset of C. > > In practice, it turned out to be a two-sided process. I worked on c2go to > make it handle more of the constructs used in brotli, and I refactored the > brotli codebase to get rid of things c2go couldn’t handle, until the two > converged. > > My fork of rsc/c2go is at github.com/andybalholm/c2go; the README contains > some more of my thoughts on the transpilation process, and a general summary > of how to go about translating a C project. > > Andy -- 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, visit https://groups.google.com/d/optout.
Re: [go-nuts] [ANN] PipeHub: A programmable proxy server
Hi Diego, Thanks for sharing, looks very interesting! Please keep us posted and let us know when it's production-ready. We also implemented a simple reverse proxy at the company since we wanted it to be easy to automatically set up and configure. This helped us to add a simple reverse proxy to microservices running on each instance (and we have a lot of instance that are deployed automatically). Beforehand we tried with nginx and maintaining many custom deployments turned out to be a very complex devop task. While you pursue a bit different goal, have a look at what a minimalist reverse proxy had to fulfill for us: https://github.com/Parquery/revproxyry Cheers, Marko Le sam. 23 mars 2019 à 18:30, Diego Bernardes a écrit : > Hi, > > For the past weeks, I've been working in a personal project that I wanted > to do for a long time. Is a programmable proxy. > > Load balancer, API Gateway, Cache, TLS termination, and so on, are all > example of servers that run on typical stack. But why we need to run all > these servers? Wouldn't be better having all this logic into a single > server? And this is the core idea of this project. > > The idea is to enable deep customizations at the request path. This > customization is done by injecting Go packages, called pipe, to handle the > request. > > Everything is at a very early stage. I'm gonna focus now on the little and > important things like the docs, logs, and metrics. > > > Would love to hear your options and suggestions. > > https://github.com/pipehub/pipehub > > -- > 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, visit https://groups.google.com/d/optout. > -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Can I set a build flag to make a package compile as a plugin?
I would like to go build ./... but some of my subpackages should be compiled as plugins: go build go build -buildmode=plugin ./plugins/plugin.go Is there a directive or flag that I can specify to make the subpackages pick up the buildmode automatically? best, Jake -- 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, visit https://groups.google.com/d/optout.
[go-nuts] [ANN] PipeHub: A programmable proxy server
Hi, For the past weeks, I've been working in a personal project that I wanted to do for a long time. Is a programmable proxy. Load balancer, API Gateway, Cache, TLS termination, and so on, are all example of servers that run on typical stack. But why we need to run all these servers? Wouldn't be better having all this logic into a single server? And this is the core idea of this project. The idea is to enable deep customizations at the request path. This customization is done by injecting Go packages, called pipe, to handle the request. Everything is at a very early stage. I'm gonna focus now on the little and important things like the docs, logs, and metrics. Would love to hear your options and suggestions. https://github.com/pipehub/pipehub -- 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, visit https://groups.google.com/d/optout.
Re: [go-nuts] what +build flags do I need to distinguish between ios and macos please?
ah yes thanks, amd64, it was late :) So if I build a shared lib, it might be running in the emulator, on a device, or on my mac... I found some code referencing ios, does this look valid? // +build ios,darwin,amd64 // +build ios,darwin,arm64 ios,darwin,arm // +build !ios,darwin,amd64 Peter -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Is there a reason the cert used by httptest.StartTLSServer(...) is not valid for localhost?
Sorry, I should have read your post more thoroughly. You probably know this all. Regards Mirko -- 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, visit https://groups.google.com/d/optout.
[go-nuts] local module rename causing build errors looking for previous module name
Bit of a strange one... I created a new module this morning, and just renamed the directory, module and associated package (all the same). I have a sub module (package main) that references the parent module, but we are talking about a dozen lines of code in the whole project so far. So 'go build' complains 'cannot load : cannot find module providing package ' So I was thinking something must be cached. I deleted a go.sum file, since there were some strange entries in it. And I also tried the following: 'go clean -modcache' and 'go clean -cache' but they both return the same error. I remembered reading about cached files in go/pkg/mod/cache and I found a recent timestamped .info file in vcs that references git2: Interesting because I'm not using git so far since it's a new folder/project. So I deleted this file, the .lock and associated folder. 'go build' however still fails with the same error, and also recreates these strange vcs entries still with the old name. I can't see any hidden files in the project directories, and I cant find any references anywhere else to the old name. Any tips for other caches where it might be pulling this information from please? macos 10.12.4, go 1.12 -- 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, visit https://groups.google.com/d/optout.
Re: [go-nuts] a way to query the module sum of a dependency with the go tool?
It just seemed like something that could probably exist. Partly convenience though; go mod -p verify (print) or some such would work anywhere in the module, while the approach I am using must be done at the root. Not a big deal though. thanks On Sat, 2019-03-23 at 09:54 +, Paul Jolly wrote: > FWIW, none that I'm aware of. If there were to be such a command I > would probably expect it be an option to go mod verify. > > Is there a problem with using go.sum in the way you're proposing? > > Or is this more a convenience thing? > > On Thu, 21 Mar 2019 at 22:03, Dan Kortschak wrote: > > > > > > Is there a command that does something like `go list -m ` > > but > > also outputs the sum for the module and module's go.mod? Other than > > `grep go.sum`. > > > > thanks > > Dan > > > > -- > > 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, visit https://groups.google.com/d/optout. -- 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, visit https://groups.google.com/d/optout.
Re: [go-nuts] a way to query the module sum of a dependency with the go tool?
FWIW, none that I'm aware of. If there were to be such a command I would probably expect it be an option to go mod verify. Is there a problem with using go.sum in the way you're proposing? Or is this more a convenience thing? On Thu, 21 Mar 2019 at 22:03, Dan Kortschak wrote: > > Is there a command that does something like `go list -m ` but > also outputs the sum for the module and module's go.mod? Other than > `grep go.sum`. > > thanks > Dan > > -- > 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, visit https://groups.google.com/d/optout. -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Re: time.Now.UnixNano() incorrect under windows7?
Windows system time has only millisecond resolution. Windows has a feature called performance counters to measure durations with higher resolution. -- 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, visit https://groups.google.com/d/optout.
[go-nuts] Is there a reason the cert used by httptest.StartTLSServer(...) is not valid for localhost?
Hello, SSL does not care about IPs or network rules, only about the content of certificates. If you want reach something via SSL and state the IP, the certificate has to be valid for the IP. You need to add two subjectAlternativeNames when creating your certificate; 127.0.0.1 and localhost For testing I sometimes fiddle with /etc/hosts and just add an entry for domain-name in one of subjectAlternativeNames and set it to 127.0.0.1 Regards Mirko -- 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, visit https://groups.google.com/d/optout.