On Thu, May 22, 2025 at 10:46 AM Jan Mercl <0xj...@gmail.com> wrote:
> On Thu, May 22, 2025 at 10:15 AM natxo@gmail.com
> wrote:
>
> > fatal error: all goroutines are asleep - deadlock!
>
> Something like this? https://go.dev/play/p/4mWJOZd9hgz
>
This works beautiflly, thanks! So adding the
hi,
I did not close the other channels, but adding this to the select code
seems to fix it:
for {
select {
case err := <-errCh:
fmt.Println(err)
case data := <-resCh:
fmt.Println("from result c
On Friday, June 7, 2019 at 6:07:09 PM UTC+2, jake...@gmail.com wrote:
>
>
>
> It is unclear what the problem is. Global variables will be accessible
> from any file that is part of package "main". As you said, you could
> convert the strings in main(), then put them in some global variables, f
hi,
I'd like to define a couple of global variables in a small cli app. The app
has a few files but it's not large.
What I'd like is to use cli flags to define options, and those options
should be available for all the functions. I quite like the fact that the
content of the variables is check
On Tue, Feb 26, 2019 at 10:58 AM Natxo Asenjo
wrote:
>
> hi,
>
> On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote:
>>
>> from the compilation error, it would seem kingpin.Flag...ExistingFile()
>> returns a *string, not a string.
>> so
hi,
On Tuesday, February 26, 2019 at 10:51:28 AM UTC+1, Sebastien Binet wrote:
>
> from the compilation error, it would seem kingpin.Flag...ExistingFile()
> returns a *string, not a string.
> so these lines:
> fmt.Printf("%v, %s, %T\n", config, config, config)
> cfg, err := ini.Load(config)
>
hi,
I am writing a script that accepts arguments and flags (using kingpin) but
am failing miserably so far. One of the arguments is a file name, which
should be then loaded by an ini library (file is in ini format).
If I hard code the file name in the script, it works, but
Code:
On Wednesday, October 31, 2018 at 10:46:41 PM UTC+1, golan...@geek1.de
wrote:
>
> Hy Natxo,
>
> check out the pkix [0] and asn1 [1] packages. You can try to parse the
> DER encoded subject into RDNSequence.
>
> [0]: https://golang.org/pkg/crypto/x509/pkix/#RDNSequence
> [1]: https://golang.o
hi,
as a learning exercise I would lke to loop through the system's certificate
authorities store, and get the subjects of each certificate authority.
I have this code:
package main
import "fmt"
import "crypto/x509"
func main() {
store, err := x509.SystemCertPool()
if err != nil {