Re: [go-nuts] Avoid global variables in Http handlers

2019-06-03 Thread Aldrin Leal
wrapping into a typedef? typedef MyHandler struct { GlobalThing string } func (h *MyHandler) handle(w http.ResponseWriter, r *http.Request) { } func main() { h := MyHandler{} http.HandleFunc("/", MyHandler.handle) } -- -- Aldrin Leal, / https://ingenieux.io/about/ On Mon, J

Re: [go-nuts] built-in alternative to bcrypt?

2019-04-22 Thread Aldrin Leal
storing password, always go for salted approaches (thus bcrypt) Also, bear in mind upx works like a charm on Go Binaries: https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/ -- -- Aldrin Leal, / https://ingenieux.io/about/ On Mon, Apr 22, 2019 at 5:15 AM whitehexagon via

Re: [go-nuts] Mutual tls example

2019-04-21 Thread Aldrin Leal
est, under TLS.PeerCertificates array -- -- Aldrin Leal, / https://ingenieux.io/about/ On Sun, Apr 21, 2019 at 7:09 AM Vasiliy Tolstov wrote: > Hi, I'm try to find mutual tls example in go, but can't find simple > example that uses crypto/tls. I need server that for some http handler fo

Re: [go-nuts] how to get data https://uinames.com/ Picture and name

2019-01-08 Thread Aldrin Leal
Did you check their github repo? https://github.com/thm/uinames -- -- Aldrin Leal, / https://ingenieux.io/about/ On Tue, Jan 8, 2019 at 4:57 AM wrote: > [image: Screen Shot 2019-01-08 at 4.57.27 PM.png] > > how to get data https://uinames.com/ Picture and name insert to

Re: [go-nuts] IDE/tools that support the new Go module feature in 1.11?

2018-08-25 Thread Aldrin Leal
Goland has been supporting it for a while: https://blog.jetbrains.com/go/2018/05/18/vgo-integration-support/ -- -- Aldrin Leal, / https://ingenieux.io/about/ On Sat, Aug 25, 2018 at 3:45 AM, nvcnvn wrote: > Hi all, > Do you know any IDE already support intellisense for a project

Re: [go-nuts] Curious about this snippet in /src/runtime/proc.go

2017-06-15 Thread Aldrin Leal
I don't know. On Jun 15, 2017 12:29, "Tyler Compton" <xavi...@gmail.com> wrote: > Why not just panic, though? And why the infinite loop, I wonder? > > On Thu, Jun 15, 2017 at 9:56 AM Aldrin Leal <ald...@leal.eng.br> wrote: > >> Force a panic in case exit

Re: [go-nuts] Curious about this snippet in /src/runtime/proc.go

2017-06-15 Thread Aldrin Leal
Force a panic in case exit fails? -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Thu, Jun 15, 2017 at 4:54 AM, <goodwin.law...@gmail.com> wrote: > Hey, > > Learning golang at the moment and came across this at the end of func > main() in proc

Re: [go-nuts] Re: How can I tell if a http.Server has a TLS listener?

2017-05-24 Thread Aldrin Leal
Can't you use type assertions? https://tour.golang.org/methods/15 -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Wed, May 24, 2017 at 4:50 PM, Frank Schröder <frank.schroe...@gmail.com> wrote: > This works but it is somewhat ugly ... > > // l is

Re: [go-nuts] Compiling Go plugins with playground/NACL/GAE-like isolation

2017-05-19 Thread Aldrin Leal
-- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Thu, May 18, 2017 at 11:19 PM, voidlogic <voidlog...@gmail.com> wrote: > As I mentioned before go-plugin uses RPC/IPC which is much slower than > shared/dynamically linked libraries So if you didn't have a high

Re: [go-nuts] Compiling Go plugins with playground/NACL/GAE-like isolation

2017-05-18 Thread Aldrin Leal
what if go-plugin + docker? I think you could block networking altogether. Wiring those two wouldn't be a problem if you use things such as go-dockerclient -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Wed, May 17, 2017 at 11:55 PM, voidlogic <voidlog...@

Re: [go-nuts] Compiling Go plugins with playground/NACL/GAE-like isolation

2017-05-17 Thread Aldrin Leal
go-plugin wouldn't work? github.com/hashicorp/go-plugin -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Wed, May 17, 2017 at 7:05 PM, voidlogic <voidlog...@gmail.com> wrote: > Hey Everyone, > > I'm working on a project to allow other teams within

[go-nuts] [ann] codecommit-package-server

2017-04-21 Thread Aldrin Leal
ks for me :) Source is available, in case you want to run your own. https://github.com/ingenieux/codecommit-package-server/ Hope it helps. -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal -- You received this message because you are subscribed to the Google G

Re: [go-nuts] How to use ~/ in terminal with go program?

2016-12-28 Thread Aldrin Leal
I believe this sums it up pretty well: http://stackoverflow.com/questions/17609732/expand-tilde-to-home-directory -- -- Aldrin Leal, <ald...@leal.eng.br> / http://about.me/aldrinleal On Wed, Dec 28, 2016 at 10:22 AM, Aurélien Desbrières < aurelien.desbrie...@gmail.com> wrote:

[go-nuts] OpenWRT-friendly golang hardware

2016-10-01 Thread Aldrin Leal
Just wondering: Which OpenWRT-based hardware you'd pick? My idea would be to write a few middleware code for an existing router platform. Most OpenWRT are based on MIPS SoCs, so this is a problem and ARM would be preferred. Plus, space is a concern as well Any ideas? Thank you -- -- Aldrin