当前位置:网站首页>golang中使用swagger遇到的一些问题
golang中使用swagger遇到的一些问题
2022-06-22 08:07:00 【活火石】
1. 下载swag,但是我们在$GOROOT/bin下没有发现swag二进制文件
方式一
$ go get -u github.com/swaggo/swag/cmd/swag
方式二
# 1.16 or newer
$ go install github.com/swaggo/swag/cmd/[email protected]
2. mac 下swag init执行报错zsh: command not found: swag
# 1. 检查是否存在swag执行文件
ls ~/go/bin. # 查找GOPATH下是否存在swag二进制文件
# 2. 检查~/.zshrc 没有引入go的执行路径,修改加入
export PATH="/User/xxxx/go/bin":$PATH
# 3. 刷新一下
source ~/.zshrc
第一个问题解决是通过官网去解决的
第二个问题解决是通过度娘去解决的,复制了别人的解决方法
边栏推荐
- Query where uiwebview is used in the project
- 模電實驗——實驗二 JFET共源極放大電路
- 多点闹钟实例
- Mt4/mql4 getting started to proficient in foreign exchange EA automatic trading tutorial - identify the emergence of the new K line
- [songhongkang MySQL database] [advanced chapter] [07] MySQL storage engine
- mapTalks:基础操作与WMS/WMTS地图服务加载
- 【宋红康 MySQL数据库 】【高级篇】【06】MySQL的逻辑架构
- QT control adds double click event
- AutoCAD 2020.3 Chinese Version (old version)
- Microsoft Remote Desktop 10.7.6 official
猜你喜欢

How can MySQL query the records with the largest consumption amount of each user?

Kubernetes practice

XMIND 2022 mind map active resources?
![[Oracle database] mammy tutorial day13 date function](/img/ca/90aaa682ec393b1531060377276ca6.png)
[Oracle database] mammy tutorial day13 date function

RAID technology

(7)双向链表

Skills required for O & M automation?

Microsoft Remote Desktop 10.7.6 official

Mt4/mql4 getting started to mastering EA tutorial lesson 4 - common functions of MQL language (IV) - common functions of K-line value

OSI and tcp/ip
随机推荐
Oracle execution plan analysis
Submit values of various inputs of the form
Orientdb batch execute SQL
DTD constraints
0基础自学stm32(野火)——什么是寄存器?
What are uniapp, wap2app and 5 + app in dccloud?
MySQL intercepts the string cs0000_ 1 medium_ Following characters
MySQL master-slave replication
Example of using listagg in Oracle 11g (splicing the values of a field into a line, separated by commas)
Permission Operation of MySQL
Mt4/mql4 getting started to be proficient in EA tutorial lesson 7 - common functions of MQL language (VII) - index value taking function
IP address planning
关于菲涅尔现象
The difference between get and post requests
What is distributed transaction
什么是分布式事务
0 basic self-study STM32 (wildfire) -- what is a register?
先锋期货安全么?期货开户都是哪些流程?期货手续费怎么降低?
Dom4j+xpath parsing XML files
QT 自定义组合控件(类提升功能)