oopsguy / m3u8

A mini M3U8 downloader written in Golang for downloading and merging TS(Transport Stream) files. 一个迷你 M3U8 视频下载工具。
MIT License
517 stars 138 forks source link

cannot find package #5

Open wqk317 opened 4 years ago

wqk317 commented 4 years ago
go run main.go -u=https://xxx.m3u8  -o=~/Downloads/xxx.mp4  

main.go:8:2: cannot find package "github.com/oopsguy/m3u8/dl" in any of:
    /usr/local/Cellar/go/1.15.1/libexec/src/github.com/oopsguy/m3u8/dl (from $GOROOT)
    /Users/alpha/go/src/github.com/oopsguy/m3u8/dl (from $GOPATH)

git clone的代码, 在项目根目录运行, 报这个错

wqk317 commented 4 years ago

额, 知道了, 代码里所有"github.com/oopsguy/m3u8/"开头的我这边不知道为啥都报错...换成本地的"./"开头就好了...

yann0917 commented 3 years ago

额, 知道了, 代码里所有"github.com/oopsguy/m3u8/"开头的我这边不知道为啥都报错...换成本地的"./"开头就好了...

因为这个项目不是用 go mod 管理的,必须放到 go/src 下面才能运行。