Golang gorename工具失败了

时间:2018-05-31 15:45:27

标签: go rename

当我重命名这样的符号时;

gorename -from '"github.com/alioygur/tatil-search/coral".ApplicationForm' -to ApplicationForm2

我收到此错误;

...
In file included from /usr/local/include/stdint.h:59:
In file included from /usr/local/include/stdint.h:59:
In file included from /usr/local/include/stdint.h:59:
In file included from /usr/local/include/stdint.h:59:
/usr/local/include/stdint.h:2:10: error: #include nested too deeply
#include <stddef.h>
         ^
/usr/local/include/stdint.h:59:11: error: #include nested too deeply
# include <stdint.h>
          ^
/usr/local/include/stdint.h:72:11: error: #include nested too deeply
# include <sys/types.h>
          ^
/usr/local/include/stdint.h:76:10: error: #include nested too deeply
#include <limits.h>
         ^
/usr/local/include/stdint.h:82:11: error: #include nested too deeply
# include <inttypes.h>
          ^
5 errors generated.
cgo failed: [go tool cgo -objdir /var/folders/03/qmcd84k176g_4p7z5bkfwszc0000gn/T/os_user_C797049444 -- -I /var/folders/03/qmcd84k176g_4p7z5bkfwszc0000gn/T/os_user_C797049444 cgo_lookup_unix.go getgrouplist_darwin.go listgroups_unix.go]: exit status 1
gorename: couldn't load packages due to errors: os/user, crypto/x509, net

1 个答案:

答案 0 :(得分:0)

您可以尝试此解决方案。对我有用 https://github.com/SOHU-Co/kafka-node/issues/881

mkdir /tmp/includes
brew doctor 2>&1 | grep "/usr/local/include" | awk '{$1=$1;print}' | xargs -I _ mv _  /tmp/includes
相关问题