Re: [go-nuts] Practical OpenAPI in Go

2025-02-13 Thread Shaun Houlihan
Hi Mike, I'm curious to hear in more detail what you mean when you say the oapi-codegen generation is "cryptic". I also have some things I don't like about that generator and have been toying with building an alternative. Feel free to contact me directly if you feel like discussing. Best, Shaun

Re: [go-nuts] input directly from cli after a function

2025-02-13 Thread Jason E. Aten
If you want to mix flags and "unflagged" arguments, like your integer, see the flag package. "After parsing, the arguments following the flags are available as the slice flag.Args or individually as flag.Arg(i). The arguments are indexed from 0 through flag.NArg-1." https://pkg.go.dev/flag Yo

Re: [go-nuts] input directly from cli after a function

2025-02-13 Thread Jabari Zakiya
Thanks! This works. func main() { var n int s := os.Args[1] n, err := strconv.Atoi(s) if err != nil {panic(err)} On Thursday, February 13, 2025 at 5:23:10 PM UTC-5 Ian Lance Taylor wrote: > On Thu, Feb 13, 2025 at 2:12 PM Jabari Zakiya wrote: > > > > I want to input an integer directl

Re: [go-nuts] input directly from cli after a function

2025-02-13 Thread Ian Lance Taylor
On Thu, Feb 13, 2025 at 2:12 PM Jabari Zakiya wrote: > > I want to input an integer directly after the function > > $ ./myfunction n (CR) > > not > > $ ./myfunction (CR) > n (CR) > > None of my search results explains how to do this. Sounds like you want to look at os.Args, which will contai

[go-nuts] input directly from cli after a function

2025-02-13 Thread Jabari Zakiya
I want to input an integer directly after the function $ ./myfunction n (CR) not $ ./myfunction (CR) n (CR) None of my search results explains how to do this. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] parallel blake3, broadcast non-zero values, wait-groups integrated with chan

2025-02-13 Thread Jason E. Aten
Some of my recent work may be of general interest. Here are three open-source contributions that have gotten new features of late: 1) A fully parallel (multiple goroutines used) Blake3 cryptographic hash, with AVX hardware acceleration. This is probably the fastest cryptographic hash you

Re: [go-nuts] Trying to write a web scraper that checks dead links on a webapge

2025-02-13 Thread Jan Mercl
On Thu, Feb 13, 2025 at 2:30 PM Dennis Lee wrote: > I use: > - go version go1.22.3 windows/amd64 Too old Go version, see https://tip.golang.org/doc/go1.23 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Trying to write a web scraper that checks dead links on a webapge

2025-02-13 Thread Dennis Lee
I am using the net/html package. I try todo this: ``` doc, err := html.Parse(body) if err != nil { return } for n := range node.Descendants() ``` But i cant compile because Descendants isnt implemented on the Node. I use: - go version go1.22.3 windows/amd64 - golang.org/x/net v0.35.0 If i go