Hi Jerry,
On Wed, 2024-02-14 at 15:31 -0800, Jeremy French wrote:
> I really think the testability issue is the biggest one.
On Wednesday, February 14, 2024 at 7:37:11 PM UTC-5 Dan Kortschak wrote:
With a Main() int, you can use e.g.
On Wed, 2024-02-14 at 15:31 -0800, Jeremy French wrote:
> I really think the testability issue is the biggest one. Generally,
> testing the main package iscumbersome at least. So it's
> reasonable to say, "I'm not going to test the main package, but I
> will keep it so simple that it is
On Thursday 15 February 2024 at 10:31:40 am UTC+11 Jeremy French wrote:
I really think the testability issue is the biggest one. Generally,
testing the main package iscumbersome at least. So it's reasonable to
say, "I'm not going to test the main package, but I will keep it so simple
I really think the testability issue is the biggest one. Generally,
testing the main package iscumbersome at least. So it's reasonable to
say, "I'm not going to test the main package, but I will keep it so simple
that it is impossible for a bug to exist in there." Then everything else
On Wednesday 14 February 2024 at 10:23:37 pm UTC+11 Mike Schinkel wrote:
I cannot speak for others but I can tell you why I keep my `main()` small:
1. I prefer to put as much logic into reusable packages as I can, and
`main()` is not reusable outside the current app.
This is understandable.
I have the task of generating the digital signature of an xml, enveloping
it in a PKCS7 packet and attaching it to the xml . I decided to
use https://pkg.go.dev/go.mozilla.org/pkcs7 , and was able to generate the
sign but it is not matching with the expected output . It seems to me that
xml
On Wed, 2024-02-14 at 12:24 +0100, Jan Mercl wrote:
> On Wed, Feb 14, 2024 at 12:14 PM 'Dan Kortschak' via golang-nuts
> wrote:
>
> > Given that this can happen without a race or unsafe modifications
> > it
> > might be worth filing a issue for.
>
> I think this is expected. Quoting from the
On Wed, 2024-02-14 at 03:12 -0800, Jerry Londergaard wrote:
> I see quite a few modules out there where they seem to be putting in
> as little into the main package as possible. Literally they will
> sometimes be a few lines:
> ```
> import foobar
> func main() {
> os.Exit(foobar.Run())
> }
>
On Wed, Feb 14, 2024 at 12:14 PM 'Dan Kortschak' via golang-nuts
wrote:
> Given that this can happen without a race or unsafe modifications it
> might be worth filing a issue for.
I think this is expected. Quoting from the big.Int docs
https://pkg.go.dev/math/big#Int
To "copy" an Int
I cannot speak for others but I can tell you why I keep my `main()` small:
1. I prefer to put as much logic into reusable packages as I can, and
`main()` is not reusable outside the current app.
2. CLI packages like Viper are configured to be invoked with just one or a
few small commands in
On Wed, 2024-02-14 at 02:07 -0800, Poonai wrote:
> Thanks all,
>
> figured out the issue:
>
> func main() {
> a := big.NewInt(1)
> b := *a
> c := *a
> c.Sub(, big.NewInt(1))
> fmt.Println(b.String())
> fmt.Println(c.String())
> fmt.Println(a.String())
> }
>
>
>
I see quite a few modules out there where they seem to be putting in as
little into the main package as possible. Literally they will sometimes be
a few lines:
```
import foobar
func main() {
os.Exit(foobar.Run())
}
```
Yet then go on to do all the things I would've thought are the domain of
Thanks all,
figured out the issue:
func main() {
a := big.NewInt(1)
b := *a
c := *a
c.Sub(, big.NewInt(1))
fmt.Println(b.String())
fmt.Println(c.String())
fmt.Println(a.String())
}
reproducible code. don't know what causing it tho :(
On Wednesday, February 14, 2024
Have you tried running your entire code under the race detector?
https://go.dev/blog/race-detector
On Wednesday 14 February 2024 at 06:02:02 UTC Kurtis Rader wrote:
> Maybe provide a minimal reproducible example (
> https://stackoverflow.com/help/minimal-reproducible-example)?
>
> While it is
14 matches
Mail list logo