0

Any vgo command shows the same error with parsing go.mod file. unknown directive: go

Here is my go.mod file:

module github.com/SvitlanaShepitsena/surf

go 1.13

require (
    github.com/PuerkitoBio/goquery v1.5.0
    github.com/headzoo/surf v1.0.0 // indirect
    github.com/headzoo/ut v0.0.0-20181013193318-a13b5a7a02ca // indirect
    gopkg.in/headzoo/surf.v1 v1.0.0
)

I am using go1.13beta1 version.

Svitlana
  • 2,324
  • 4
  • 22
  • 31
  • 1
    What do you mean by "Any vgo command"? If you're using `go1.13beta1`, what are you doing with `vgo`? – JimB Jul 22 '19 at 20:45
  • Thank you, Jim. I meant: `vgo build` , `vgo get` it parsed my go.mod and gives this error. I switched to 1.12 as I cannot debug with delve in `go1.13beta1`, but the error is still the same. Any suggestion - and I am not golang pro, so if you can explain a bit your answers - I would appreciate it :-). Currently switched to deb - working perfectly... I may stay here despite all the suggestions from pro. Thank you – Svitlana Jul 23 '19 at 16:46
  • `vgo` was an proof of concept before module support was added to go. Don’t use it any more. – JimB Jul 23 '19 at 17:04
  • so just go get is the best option? – Svitlana Jul 23 '19 at 18:33
  • 1
    Yes, the `go` command supports modules in 1.12 and 1.13 (with some support in older versions too). Read https://github.com/golang/go/wiki/Modules for a quick reference to how to use modules. – JimB Jul 23 '19 at 19:06
  • ok, thank you! Just fell in love with dep - until I get a serious problem will stick with it. – Svitlana Jul 24 '19 at 14:59

0 Answers0