> undefined: io.Discard

What version of Go are you running on your system?

io.Discard was introduced in go 1.16 <https://go.dev/doc/go1.16#ioutil>.  
unsafe.Slice was added in go 1.17 <https://pkg.go.dev/unsafe#Slice>.  The 
most recent version is 1.19, and I'd recommend you use that.

On Tuesday, 4 October 2022 at 06:29:53 UTC+1 princ...@gmail.com wrote:

> yes, I tried with the help of  https://github.com/go-git/go-git
> and there is a basics example (git clone) is given, but when I compile 
> that, it shows the following compilation errors:
>
> # github.com/kevinburke/ssh_config
> /root/go/src/github.com/kevinburke/ssh_config/config.go:318:12: 
> undefined: os.ReadFile
> /root/go/src/github.com/kevinburke/ssh_config/config.go:333:12: 
> undefined: io.ReadAll
> # golang.org/x/sys/unix
> /root/go/src/golang.org/x/sys/unix/syscall.go:84:16: undefined: 
> unsafe.Slice
> /root/go/src/golang.org/x/sys/unix/syscall_linux.go:2255:9: undefined: 
> unsafe.Slice
> /root/go/src/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: 
> unsafe.Slice
> /root/go/src/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: 
> unsafe.Slice
> # golang.org/x/crypto/ssh
> /root/go/src/golang.org/x/crypto/ssh/cipher.go:499:13: undefined: 
> io.Discard
> /root/go/src/golang.org/x/crypto/ssh/session.go:508:14: undefined: 
> io.Discard
> /root/go/src/golang.org/x/crypto/ssh/session.go:521:14: undefined: 
> io.Discard
>
> On Wednesday, September 28, 2022 at 11:51:36 PM UTC+5:30 Reto wrote:
>
>> On Tue, Sep 27, 2022 at 09:46:04PM -0700, PK wrote: 
>> > I want to write an go script, to upload a folder in the github. Can 
>> anyone 
>> > please let How I can do this. 
>>
>> Depending on what you mean by "upload folder" you can either use git, 
>> assuming you meant source code / version tracked stuff or you can 
>> interact with the GH API either via rest or grahpql. 
>>
>> There's a bunch of info available, say 
>>
>> * https://docs.github.com/en/developers/overview/about-githubs-apis 
>> * https://github.com/shurcooL/githubv4 
>>
>> Go from there. 
>>
>>
>> Cheers, 
>> Reto 
>>
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/069d7c37-c48f-4199-bbfc-6c0a00c7f2fen%40googlegroups.com.

Reply via email to