This is a creation in Article, where the information may have evolved or changed.
Beego 1.7. Version 0 was released. According to Tengyun Science and technology ty300.com understand Beego is a Go language development application framework, diligent learning qkxue.net think Beego ideas from tornado, routing design from Sinatra
New enhancements:
1. Filter access speed increased by more than 7.5 times times #1799
2. Gzip compression is supported at different level #1808
3. ORM PK supports negative #1810
4. ORM supports custom self-increment ID values #1826
5. Context download file function improvements: Check the existence of the file before downloading #1827
6. Log adds the GetLogger function, you can add the corresponding prefix #1832
Package Main
Import "Github.com/astaxie/beego/logs"
Func Main () {
Logs. Warn ("This is a Warn message")
L: = logs. GetLogger ("HTTP")
L.println ("This is a message of http")
Logs. GetLogger ("ORM"). Println ("This is a message of ORM")
Logs. Debug ("My book was bought in the year of", 2016)
Logs. Info ("This%s cat was%v years old", "Yellow", 3)
Logs. Error (1024x768, "is a very", "good", 2.5, map[string]int{"id": 1})
Logs. Critical ("Oh my God")
}
7. Session added log, once the error occurred can log. #1833
8. The logs package adds two public functions, enablefunccalldepth and setlogfunccalldepth, which are used to set the call level of a function. #1837
9. Support Go run Beego project code #1840
10. Add the Executetemplate function so that users can access the template in this way, rather than accessing the map directly because map has concurrent read and write problems #1848
The. ORM field supports the time type #1856
The ORM one interface only gets a single #1874
ORM supports JSON JSONB type #1875
ORM uses the text type by default #1879
Session configuration three configuration, Enablesidinhttpheader Enablesidinurlquery Sessionnameinhttpheader,
Allows the user to have SIDs in HTTP headers and URLs #1897
16. Automated routing improvements generated file names that were too long before #1924
17. Support for complex template engines. Ace Jade #1940
Beego. Addtemplateengine ("Ace", func (root, path string, Funcs template.) Funcmap) (*template. Template, error) {
Aceoptions: = &ace. Options{dynamicreload:true, Funcmap:funcs}
Acebasepath: = filepath. Join (Root, "base/base")
Aceinnerpath: = filepath. Join (Root, strings. Trimsuffix (Path, ". Ace"))
TPL, err: = Ace. Load (Acebasepath, Aceinnerpath, aceoptions)
If err! = Nil {
return nil, FMT. Errorf ("Error loading Ace Template:%v", err)
}
Return TPL, Nil
})
#1940
The session engine supports SSDB #1953
RenderForm supports output required #1993
20. Make the printed beego log more beautiful #1997
. ORM supports structs with Time.time pointers #2006
22. Add Tplprefix to the controller This allows you to create a prefix directory to read the template in the Basecontroller #2030
. Add the JS function to the JSONB function to avoid errors when the function does not exist. #2045
24. ORM adds the Insertorupdate function #2053
25. The filter function increases the parameters of the reset parameter. Because Beego. Insertfilter ("*", Beego. Beforestatic, Redirecthttp)
, the parameter is assigned to: Splat, which affects the subsequent if the route also has a want to use the route,
then will cause a conflict, so add such a function to facilitate user reset. #2085
. Session package configuration takes object initialization and discards the way JSON is passed. If you use the session package independently, you may be able to cause compatibility issues #2096
27. Swagger migrated to version 2.0 and now produces code that does not have to rely on APIs to directly produce Swagger.json
Bugfix:
1. A static route in/m automatically jumps to/m/#1792
2. Error parsing configuration file when #1794
3. File Rotato generated race condition #1803
4. Fix multiple response. Writeheader calls error #1805
5. ORM If the primary key is UINT panic #1828
6. Log rotate If the current time is less than panic #
7. Context reuse results in XSRF reuse #1863
8. ORM Insertmulti when it is a * type panic #1882
9. The task may have performed multiple times within a very small time #1909
10. Internet Explorer download file name confusion #1912
11. ORM DISTINCT implements #1938
12. int cannot be set when the logs package contains the permit of the file. #1948 #2003
13. Queryrow and queryrows query gets data after the foreign key field does not populate the value #1964
14. When the Beego application runs behind the agent, scheme obtains #2050
15 through X-forwarded-proto. Static file access directory when you jump to the table of contents/time automatically with the parameters #2064