Re: [go-nuts] when doing a WalkDir of a FileSystem, how do you get access to the path that you are working on

2023-01-14 Thread Pat Farrell
On Saturday, January 14, 2023 at 6:52:15 PM UTC-5 raf wrote: The function you implement (WalkDirFunc should receive "p" as the path to the parent (that seems to be what you want) and "d" as the current directory entry. I am not sure why in your example you are showing full paths to the file

Re: [go-nuts] when doing a WalkDir of a FileSystem, how do you get access to the path that you are working on

2023-01-14 Thread Raffaele Sena
The function you implement (WalkDirFunc should receive "p" as the path to the parent (that seems to be what you want) and "d" as the current directory entry. I am not sure why in your example you are showing full paths to the file for "p". On Sat, Jan 14, 2023 at 3:39 PM Pat Farrell wrote: >

[go-nuts] when doing a WalkDir of a FileSystem, how do you get access to the path that you are working on

2023-01-14 Thread Pat Farrell
I'm using the reasonably new FileSystem style to do the usual directory walk processing every file in the usual recursive manner. I can't figure out how to get the directory data (the path up to the last /) even though I can see it in the output. I am missing the proper name of the getter, or

Re: [go-nuts] Guaranteeing deterministic execution of Golang code

2023-01-14 Thread 'Axel Wagner' via golang-nuts
Oh, also, fmt: https://go.dev/play/p/xxOw3vqWR4u (probably need to run this offline) Honestly, I don't think there really is a practical way to prevent non-determinism without severly hampering the language. Your best bet is probably to compile a program to webassembly and then don't give the VM

Re: [go-nuts] Guaranteeing deterministic execution of Golang code

2023-01-14 Thread 'Axel Wagner' via golang-nuts
There's also maps, select and goroutines in general. Funnily enough I blogged about this some years ago, for fun . On Sat, Jan 14, 2023 at 11:52 PM Stan Srednyak wrote: > How much of Golang functionality must

[go-nuts] Guaranteeing deterministic execution of Golang code

2023-01-14 Thread Stan Srednyak
How much of Golang functionality must be excluded in order to guarantee deterministic execution on a fixed system? There are typical sources of nondeterminism 1. /dev/urandom 2. time We should include system variables here, but lets suppose we fix the system. One more source could be

Re: [go-nuts] output slice without brackets

2023-01-14 Thread Martin Schnabel
Hi, if you have string slice you can use strings.Join(slice, ", "). Please do send text as text to mailing lists. Hope this helps, have fun! On 1/14/23 09:46, Nuraini putri wrote: Hi, I wanna ask about How to print slice output without brackets? DISCORD.png -- You received this message

[go-nuts] output slice without brackets

2023-01-14 Thread Nuraini putri
Hi, I wanna ask about How to print slice output without brackets? [image: DISCORD.png] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-14 Thread Brian Candler
P.S. For using tinygo to generate Linux executables, see: https://tinygo.org/getting-started/install/linux/ https://tinygo.org/docs/guides/linux/ But I couldn't find the minimum kernel version requirements. On Saturday, 14 January 2023 at 11:41:21 UTC Brian Candler wrote: > On Friday, 13

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-14 Thread Brian Candler
On Friday, 13 January 2023 at 20:42:28 UTC mi...@newclarity.net wrote: I SSHed into the ESXi server, used wget to pull down the Golang tarball, used tar to extract it from within the ESXi shell, and then used `go run hello.go` in the ESXi shell and got a runtime error of "epollwait on fd 4