Comments (2)
不存在的配置文件项是指什么?
from bee.
是这样,我之前出过一个bug,拼接一个图片地址,是通过域名+图片名字的方式拼接。域名通过beego.AppConfig.String获得。当时配置文件有问题,没有获取到域名的值,所以图片上线后没有能够正常展示。
这种情况编译的时候没有问题。我想假如编译打包的时候能检测到调用了不存在的配置文件,这样子的问题就能在前期处理解决掉。
我的想法是通过beego/config包初始化配置文件,然后通过正则匹配到代码里面beego.AppConfig调用配置文件的值,然后匹配,如果引用了不存在的,就警告。还有一个想法,就是config包里面调用getdata的时候检查,如果在尝试引用不存在的配置项,发出警告,但是这样做的话警告有点多。
from bee.
Related Issues (20)
- 生成文档问题
- Default 'bee api' returns 404 HOT 1
- swagger 如何切换不同版本请求
- Support struct resopnse with @Failture HOT 1
- 运行bee run -gendoc=true无法生成commentsRouter_controllers.go文件 HOT 3
- 当一个方法支持多种method时会产生同样的operation id HOT 2
- bee run 访问404 HOT 6
- bee generate routers 支持/{*}这种形式生成路由也能正常访问
- bee pro gen过程中不能git clone.... HOT 1
- init global config instance failed. If you do not use this, just ignore it. open conf/app.conf: no such file or directory
- pack for m1 makbook HOT 2
- Mac下bee 命令行无法执行 zsh: command not found: bee HOT 1
- 升级、版本号、v1和v2共存问题 HOT 3
- How to generate a custom directory structure? HOT 1
- 无法自动刷新 HOT 3
- please update swaggerVersion to 4.6.2 in file run/docs.go !!
- bee v2 install fail HOT 5
- 关于bee pack命令 HOT 3
- Why can't I run migrations with bee tool -conn with environment variables HOT 4
- New
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bee.