Re: [go-nuts] Re: fonts, bitmap and the (old TeX) PK file format

2021-09-02 Thread 'Sebastien Binet' via golang-nuts
On Thu Sep 2, 2021 at 22:21 CET, Andy Balholm wrote: > You don't need a full PostScript interpreter to use a Type 1 font. They > use a very limited subset of PS. I surmised as much reading through: - https://adobe-type-tools.github.io/font-tech-notes/pdfs/T1_SPEC.pdf (which is my next target as

Re: [go-nuts] Managing perpetually running goroutines

2021-09-02 Thread Sanyia Saidova
Awesome, thanks so much for the help here! Learned a lot from the input and code examples. :) Much appreciated! On Thu, 2 Sep 2021, 15:49 Bryan C. Mills, wrote: > On Wed, Sep 1, 2021 at 5:55 PM wrote: > >> Thanks Bryan, especially for the code example. >> >> >> Would using a sync.WaitGroup in

[go-nuts] Re: Printing a slice of structs recursively

2021-09-02 Thread Michael Ellis
Here's one way. https://goplay.space/#5KzrUc0171N On Thursday, September 2, 2021 at 1:03:48 AM UTC-4 seank...@gmail.com wrote: > Try doing it recursively, passing in both the current parent id and > indentation level > > On Thursday, September 2, 2021 at 3:55:01 AM UTC+2 n.erde...@gmail.com > w

[go-nuts] Why don't we have to use 'std' as the module prefix for packages from the standard library?

2021-09-02 Thread Connor Kuehl
I'm trying to wrap my head around modules. When importing other packages into my project, there is a module prefix. For example, import ( "example.com/potato/tomato" ) will import the "tomato" package from the "example.com/potato" module. But this whole time as I've been learni

[go-nuts] Building Better MVPs in Go

2021-09-02 Thread hatchpad
We spoke with Frankie Nicoletti, Head of Engineering at Zero Grocery, about common mistakes that software engineers make when jumping into Go and highlights the importance of using strong organizational structures when designing and scaling MVPs. In particular, she covers: · How you s

Re: [go-nuts] Re: fonts, bitmap and the (old TeX) PK file format

2021-09-02 Thread Andy Balholm
You don't need a full PostScript interpreter to use a Type 1 font. They use a very limited subset of PS. To embed one in a PDF, I don't think you need to parse it at all, if you know the metrics and the encoding already. You can just embed it as a binary blob, if I'm not mistaken. Andy On 9

Re: [go-nuts] Makefiles for Go Programs

2021-09-02 Thread Roland Müller
Hello, A big thank you to everybody who contributed to this thread! I guess it will take some time to process the things learned from this discussion. BR, Roland Am Mi., 25. Aug. 2021 um 12:28 Uhr schrieb Stephen Illingworth < stephen.illingwo...@gmail.com>: > I use Makefiles with Go projects.

Re: [go-nuts] Where to copy vendor to the go docker builder?

2021-09-02 Thread Chris Burkert
Would it help to set up your own module proxy e.g. with https://github.com/gomods/athens or https://github.com/goproxy/goproxy? K Prayogo schrieb am Do. 2. Sept. 2021 um 03:54: > I'm trying to make docker build faster for software that are built with > golang > tried to cache layer but it still

Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread Van Fury
Thank you for your answer. Very helpful. On Thursday, September 2, 2021 at 8:01:54 PM UTC+3 seank...@gmail.com wrote: > gorilla/mux tests routes in the order they're added. > You can register your shared_data route before the {id} one if you must > keep the ambiguous path, > though the better o

Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread Sean Liao
gorilla/mux tests routes in the order they're added. You can register your shared_data route before the {id} one if you must keep the ambiguous path, though the better option is to not have ambiguous paths in the first place. On Thursday, September 2, 2021 at 6:18:36 PM UTC+2 bse...@computer.org

Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread burak serdar
Your paths are ambiguous. "/nfdm-fdm/v2/shared-data" matches "/nfdm-fdm/v2/{id}" where id=shared_data. You can use a regex for the path with {id} to exclude the "shared_data" match. On Thu, Sep 2, 2021 at 10:13 AM Van Fury wrote: > Hi All, > > I have the following to handler functions, DataSets

[go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread Van Fury
Hi All, I have the following to handler functions, DataSetsGet and RetrieveSharedData. When make request with the URL https://127.0.0.1:2/nfdm-fdm/v2/shared-data, I get response from DataSetsGet handler instead of RetrieveSharedData handler function. When I take the bracket from {id} to id

Re: [go-nuts] Managing perpetually running goroutines

2021-09-02 Thread 'Bryan C. Mills' via golang-nuts
On Wed, Sep 1, 2021 at 5:55 PM wrote: > Thanks Bryan, especially for the code example. > > > Would using a sync.WaitGroup in place of the `done` channel in your > example be overkill? Just exploring what’s possible here for my own > education. > Using a `sync.WaitGroup` in place of the `done` ch

Re: [go-nuts] pkg.go.dev: navigation index is confusing

2021-09-02 Thread 'Axel Wagner' via golang-nuts
On Thu, Sep 2, 2021 at 12:26 PM Markus Heukelom wrote: > So, turns out, the function is actually listed under the type "Handler", > probably because it implements that interface. > Because it returns that type. It's a heuristic to find "constructors" of types, which is useful if you know you wan

[go-nuts] pkg.go.dev: navigation index is confusing

2021-09-02 Thread Markus Heukelom
The main issue is that most package functions are not actually listed under "Functions". For example, I wanted to lookup StripPrefix in the http package. I could not find it in the package documentation function index. It was not there. So I looked under Types (maybe I did remember it incorre