Giter VIP home page Giter VIP logo

Comments (2)

astaxie avatar astaxie commented on September 13, 2024

不存在的配置文件项是指什么?

from bee.

mnhkahn avatar mnhkahn commented on September 13, 2024

是这样,我之前出过一个bug,拼接一个图片地址,是通过域名+图片名字的方式拼接。域名通过beego.AppConfig.String获得。当时配置文件有问题,没有获取到域名的值,所以图片上线后没有能够正常展示。

这种情况编译的时候没有问题。我想假如编译打包的时候能检测到调用了不存在的配置文件,这样子的问题就能在前期处理解决掉。

我的想法是通过beego/config包初始化配置文件,然后通过正则匹配到代码里面beego.AppConfig调用配置文件的值,然后匹配,如果引用了不存在的,就警告。还有一个想法,就是config包里面调用getdata的时候检查,如果在尝试引用不存在的配置项,发出警告,但是这样做的话警告有点多。

from bee.

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.