Go Language Application Framework Beego

Source: Internet
Author: User

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

The ORM supports a struct with a time.time pointer #2006
Add Tplprefix to the controller so you can create a prefix directory to read the template in Basecontroller #2030
Add the JS function to the JSONB function to avoid errors when the function does not exist. #2045
Add Insertorupdate function #2053
The filter function increases the parameters of the reset parameter. Because Beego. Insertfilter ("*", Beego. Beforestatic, Redirecthttp)
, the parameters are assigned to: Splat, which affects subsequent routing if there is a route that you want to use,
This can cause conflicts, so add such a function to make it easier for users to reset. #2085
The session package configuration takes object initialization and discards the way the JSON is passed. Compatibility issues may be caused if you use the session package independently #2096
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. Static route in/m automatically jumps to/m/#1792
2. Error parsing the configuration file when test #1794
3. Race condition is generated when the file is Rotato #1803
4. Repair multiple response. Writeheader calls error #1805
5. ORM If the primary key is a uint panic #1828
6. Log rotate If the current time is less than panic #
7. Context reuse leads to xsrf reuse #1863
8. ORM Insertmulti when it is * type Panic #1882
9. There may be multiple executions of tasks within a task in a very small time #1909
Internet Explorer download file name confusion #1912
One. ORM DISTINCT implementation #1938
int cannot be set when the logs package contains the permit of the file. #1948 #2003
Queryrow and QueryRows the foreign key field does not populate the value after the query gets the data #1964
14. When the Beego application runs behind the agent, scheme obtains the #2050 by X-forwarded-proto
15. Static file access directory when jumping to the table of contents/When the parameters are automatically #2064

Go Language Application Framework Beego

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.