450}
451
452// AddAliasWthDB add a aliasName for the drivename
453func AddAliasWthDB(aliasName, driverName string, db *sql.DB, params ...DBOption) error {454 _, err := addAliasWthDB(aliasName, driverName, db, params...)
455 return err
456}
214// ParseData parse ini the data
215// When include other.conf,other.conf is either absolute directory
216// or under beego in default temporary directory(/tmp/beego[-username]).
217func (ini *IniConfig) ParseData(data []byte) (Configer, error) {218 dir := "beego"
219 currentUser, err := user.Current()
220 if err == nil {
1002 p.chainRoot.filter(ctx, p.getUrlPath(ctx), preFilterParams)
1003}
1004
1005func (p *ControllerRegister) serveHttp(ctx *beecontext.Context) {1006 var err error
1007 startTime := time.Now()
1008 r := ctx.Request
291 return t.match(pattern[1:], pattern, w, ctx)
292}
293
294func (t *Tree) match(treePattern string, pattern string, wildcardValues []string, ctx *context.Context) (runObject interface{}) {295 if len(pattern) > 0 {
296 i, l := 0, len(pattern)
297 for i < l && pattern[i] == '/' {
51 t.addtree(splitPath(prefix), tree, nil, "")
52}
53
54func (t *Tree) addtree(segments []string, tree *Tree, wildcards []string, reg string) { 55 if len(segments) == 0 {
56 panic("prefix should has path")
57 }
Methods or fields of struct that have names different only by capitalization could be confusing.
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
buildSystem string
// name of the build system to use
BuildSystem string
}
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
internalBuildSystem string
// name of the build system to use
BuildSystem string
}