kamilkabir9 / LDrop

Send Files between your computer and Mobile. :computer: <=:open_file_folder:=> :iphone:
GNU General Public License v3.0
12 stars 2 forks source link

Can't build from source, newbee problem #3

Closed brownchow closed 4 years ago

brownchow commented 4 years ago

Hello kamilkabir9! I clone this repository to my computer directory /d/golang/src/github.com/kamilkabir9/LDrop,then I change to that directory and execute go build . , the console output is

LDrop.go:10:2: cannot find package "github.com/kamilkabir9/LDrop/statik" in any of:
        D:\Go\src\github.com\kamilkabir9\LDrop\statik (from $GOROOT)
        d:\golang\src\github.com\kamilkabir9\LDrop\statik (from $GOPATH)

I find in LDrop.go line 10, you import _ "github.com/brownchow/LDrop/statik" // NOTE: Replace with the absolute import path,but in .gitignore, you ignore statik/, so there may be some thing wrong

then I download LDrop_windows_amd64.exe from release page, It works fine!

I do this in windows10

kamilkabir9 commented 4 years ago

Hi brownchow

Check out https://github.com/rakyll/statik, the maintainer says to run $ statik -src=/path/to/your/project/public to generate a package of all files to be served.

brownchow commented 4 years ago

thank you kamilkabir9, I read https://github.com/rakyll/statik mannual, and run /d/golang/bin/statik.exe -src=./website in project root directory, it generates a dir called statik/, and then it works!

thanks a lot!