pluveto / upgit

Another upload hub that supports clipboard. It works well with Typora, Snipaste, VSCode.
MIT License
541 stars 44 forks source link

ubuntu can not upload image in clipboard #58

Open cbweixin opened 1 year ago

cbweixin commented 1 year ago
gabriel@gabriel-HP-ProDesk-600-G2-SFF:~$ upgit :clipboard
panic: clipboard: cannot use when CGO_ENABLED=0

goroutine 1 [running]:
golang.design/x/clipboard.initialize(...)
    /Users/runner/go/pkg/mod/golang.design/x/clipboard@v0.6.0/clipboard_nocgo.go:9
golang.design/x/clipboard.Init(...)
    /Users/runner/go/pkg/mod/golang.design/x/clipboard@v0.6.0/clipboard.go:102
main.handleClipboard()
    /Users/runner/work/upgit/upgit/main.go:373 +0x46a
main.mainCommand()
    /Users/runner/work/upgit/upgit/main.go:59 +0x85
main.main()
    /Users/runner/work/upgit/upgit/main.go:45 +0x7b
gabriel@gabriel-HP-ProDesk-600-G2-SFF:~$ go version
go version go1.19.5 linux/amd64
gabriel@gabriel-HP-ProDesk-600-G2-SFF:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy
gabriel@gabriel-HP-ProDesk-600-G2-SFF:~$ 

I tested uploading image file, it works fine

gabriel@gabriel-HP-ProDesk-600-G2-SFF:~$ upgit Pictures/Screenshots/Screenshot\ from\ 2023-01-24\ 10-40-02.png 
https://raw.githubusercontent.com/cbweixin/seleniumdemo/master/2023/01/upgit_20230124_1674585891.png

thanks a lot for your help!

pluveto commented 1 year ago

Thanks for your feedback. We'll later provide a build with CGO_ENABLED=1.