wklken / suggestion

搜索输入框-下拉提示(推荐), 提示词根据权重排序.基于double-array-trie的darts, golang语言实现.
https://github.com/wklken/suggestion
180 stars 51 forks source link

方法2执行失败 #13

Closed wqw547243068 closed 2 years ago

wqw547243068 commented 2 years ago

问题

export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/Desktop/code/nlp_base/sug/suggestion

注:

wqw547243068 commented 2 years ago

问题

  • 执行:go run test_run.go
  • 错误提示:build command-line-arguments: cannot find module for path _/Users/wqw/Desktop/code/nlp_base/sug/suggestion/darts
  • 环境变量:

    • go version go1.17.6 darwin/amd64
    • GOPATH已经设置为当前目录
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/Desktop/code/nlp_base/sug/suggestion

注:

  • 方法1没问题,看着像是本地包导入失败

已解决,方法: