Giter Site home page Giter Site logo

Comments (8)

iStig avatar iStig commented on July 28, 2024

现在我通过6)把offlineServer拷贝到了 Douments > go > src目录下 现在的目录接口是Douments > go > src > offlineServer 这时候通过7)切换到 Documents > go > src 运行 run build 报错 can't load package: package .: no Go files in /Users/istig/Documents/go/src

from jxbwkwebview.

iStig avatar iStig commented on July 28, 2024

我尝试在Douments > go > src > offlineServer 输入命令 go build 生成一个unix可执行文件 名字为OfflineServer
接着继续在Douments > go > src > offlineServer 目录下运行 go run 报错go run: no go files listed

from jxbwkwebview.

iStig avatar iStig commented on July 28, 2024

请问这个readme 对于go的配置是否有点问题

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

export GOPATH=/Users//Documents/go //更改为Documents
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN

第一行your name那里应该放你mac的名字。

from jxbwkwebview.

iStig avatar iStig commented on July 28, 2024

export GOPATH=/Users//Documents/go //更改为Documents
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN

第一行your name那里应该放你mac的名字。

这个没问题
export GOPATH=/Users/istig/Documents/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
我是这么配置的

只是后面走 go build 和 go run 报错

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

切换到Douments > go > src > offlineServer,执行go run main.go

main.go是入口

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

额,你要是能用就先这么用着吧。但其实你这种解决方法严格来说是不正确的,GOPATH包含的每个路径都是一个工作区,Go语言的源码文件都需要被存放在环境变量GOPATH包含的某个工作区中的src目录下的某个代码包(目录)中。

from jxbwkwebview.

iStig avatar iStig commented on July 28, 2024

额,你要是能用就先这么用着吧。但其实你这种解决方法严格来说是不正确的,GOPATH包含的每个路径都是一个工作区,Go语言的源码文件都需要被存放在环境变量GOPATH包含的某个工作区中的src目录下的某个代码包(目录)中。
嗯 你说的没错 我去掉了上面的一层回复

from jxbwkwebview.

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.