Git Product home page Git Product logo

Comments (11)

fatih avatar fatih commented on May 28, 2024 1

@dmikalova yes as @deepthawtz said that's the case for it. I think we can rephrase it better in the tutorial :)

from vim-go-tutorial.

deepthawtz avatar deepthawtz commented on May 28, 2024

I think the purpose of running that command is to create a scratch space for following along w/ the tutorial, you'll be the one adding Go code in that directory

from vim-go-tutorial.

deepthawtz avatar deepthawtz commented on May 28, 2024

@fatih yo, thanks for putting this tutorial together. Have been enjoying & using vim-go for a while and never knew many of these features existed. I think :GoCoverage just blew my mind

from vim-go-tutorial.

dmikalova avatar dmikalova commented on May 28, 2024

@deepthawtz Yup, I just cloned the repo and have been working through it. However, the tutorial says the following which doesn't work:

If you already have a GOPATH set up just execute:
go get github.com/fatih/vim-go-tutorial

Adding any go file should work, I just don't know how @fatih would want to handle it.

from vim-go-tutorial.

fatih avatar fatih commented on May 28, 2024

Actually there is only one example that requires a GOPATH. But having it inside a GOPATH from the beginning is future proof and thus better looking forward. I'll add a file as it seems to be better.

from vim-go-tutorial.

InvisibleTech avatar InvisibleTech commented on May 28, 2024

@fatih
I am running this on OSX 10.11.6

I am still seeing this issue today. Just started working the vim-go tutorial.

I have a path set up for my user:

$HOME/golang/work/src/github.com/fatih/vim-go-tutorial
As shown by this grep out:

set | grep GO
GOPATH=/Users/mylogin/golang/work
GOROOT=/usr/local/opt/go/libexec

I follow my understanding of the tutorial:

For the tutorial, all our examples will be under GOPATH/src/github.com/fatih/vim-go-tutorial/. Please be sure you're inside this folder. Create if necessary. This will make it easy to follow the tutorial.

So I go there as shown by this pwd out:

pwd
/Users/mylogin/golang/work/src/github.com/fatih/vim-go-tutorial

I run the command and get the error as shown here:

go get github.com/fatih/vim-go-tutorial
can't load package: package github.com/fatih/vim-go-tutorial: no buildable Go source files in /Users/mylogin/golang/work/src/github.com/fatih/vim-go-tutorial

I had go installed by Homebrew before starting this tutorial. Could that be a source of problems?

from vim-go-tutorial.

fatih avatar fatih commented on May 28, 2024

@InvisibleTech

I think it errors because the folder is already there. If you delete vim-go-tutorial and and do another go get it'll download it. But it's ok if it's there, just continue following the tutorial :)

from vim-go-tutorial.

InvisibleTech avatar InvisibleTech commented on May 28, 2024

That did work for me. I had manually created the folder before running the go get command because I interpreted "Create if necessary." as immediate from the tutorial text copied below:

For the tutorial, all our examples will be under GOPATH/src/github.com/fatih/vim-go-tutorial/. Please be sure you're inside this folder. Create if necessary. This will make it easy to follow the tutorial.

I was in follow-the-steps mode.

from vim-go-tutorial.

fatih avatar fatih commented on May 28, 2024

@InvisibleTech good catch, let me fix the wordings as they both contradict with each other.

from vim-go-tutorial.

fatih avatar fatih commented on May 28, 2024

@InvisibleTech I've updated the tutorial, thanks for the feedback.

from vim-go-tutorial.

InvisibleTech avatar InvisibleTech commented on May 28, 2024

Crap I just submitted a PR for that just now. No wonder my fresh clone PR got merge conflict warnings. Well whatever commit is best....

from vim-go-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.