diff --git a/README.md b/README.md index a7da066b..882867f5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- + Logo created by an Iris community member, https://github.com/OneebMalik @@ -8,51 +8,74 @@
-
Build Status - -http://goreportcard.com/report/kataras/iris - -Built with GoLang - -Cross framework - -Donation - -
- - -CHANGELOG/HISTORY - -Examples - -Practical Guide/Docs - -Chat
-
Iris provides efficient and well-designed toolbox with robust set of features to
create your own -perfect high-performance web application
with unlimited portability using the Go Programming Language. +perfect high-performance web application
with unlimited potentials amd portability.

Easy to learn while it's highly customizable, ideally suited for
both experienced and novice developers.

If you're coming from Node.js world, this is the expressjs for the Go Programming Language. -

+

+ +Not just another Go Web Framework +---------- + + +

+CHANGELOG/HISTORY + +Examples + +Docs + +Chat + +http://goreportcard.com/report/kataras/iris + + +Donation + + +Build Status + +

+ + +- Iris is fully vendored. That means it is independent of any API changes in the used libraries and will work seamlessly in the future! + + +- Iris follows the latest tech trends around the world. + +- Iris' features are visible to other web frameworks after some time. That means that Iris is followed by other go web frameworks. + +- Iris is a high-performance tool, but it doesn't stops there. Performance depends on your application too, Iris helps you to make the right choices on every step. + +- Familiar and easy API. + +- Examples and Documentation for the most use cases and if you don't find something, just do an online search of the net/http way and adapt this way to Iris, Iris is not black-magic, I didn't invent the world. + +- Iris is a low-level web framework, you know what you code on each single line. + +- You'll never miss a thing from `net/http`, but if you do on some point, no problem because Iris is fully compatible with stdlib, you still have access to `http.ResponseWriter` and `http.Request`, you can adapt any third-party middleware of form `func(http.ResponseWriter, *http.Request, next http.HandlerFunc)` as well. + +- Iris is a community-driven project, you suggest and I code. + +- Unlike others, this repository is very active. When you post an issue, you get an answer in the next couple of minutes, hours at the worst. If you find a bug, I am obliged to fix it on the same day. + +> Q: Why this framework is better than alternatives, does the author is, simply, better than other developers? + +> A: Probably not, I don't think that I'm better than anyone else, I still learning every single day. The answer is that I have all the world's time to code for Iris the whole day, I don't have any obligations to anybody else, except you. I'd describe my self as a very dedicated FOSS developer. + +Click the below animation to see what people say about Iris. What people say - -What people say - - - -

- Installation ----------- @@ -149,13 +172,11 @@ func getByIDHandler(ctx *iris.Context) { Documentation ----------- - + - The most important is to know where to find the [details](https://godoc.org/gopkg.in/kataras/iris.v6) - - Read [the practical guide](https://docs.iris-go.com/) - - Navigate through [examples](https://github.com/iris-contrib/examples) - [HISTORY.md](https://github.com//kataras/iris/tree/v6/HISTORY.md) file is your best friend. @@ -223,7 +244,7 @@ Besides the fact that we have a [community chat][Chat] for questions or reports Versioning ------------ -Current: **v6.2.0** +Current: **v6**, code-named as "vNext" v5: https://github.com/kataras/iris/tree/5.0.0 diff --git a/configuration.go b/configuration.go index af5c77be..50234ffc 100644 --- a/configuration.go +++ b/configuration.go @@ -90,7 +90,7 @@ type Configuration struct { // listening to the $instance.Handler after the manually-called $instance.Build // // Default comes from iris.Default.Listen/.Serve with iris' listeners (iris.TCP4/UNIX/TLS/LETSENCRYPT). - VHost string `yaml:"vHost"` + VHost string `yaml:"VHost"` // VScheme is the scheme (http:// or https://) putted at the template function '{{url }}' // It's an optional field, @@ -101,20 +101,20 @@ type Configuration struct { // addr only(http://) but the nginx mapper is listening to https:// // // Default comes from iris.Default.Listen/.Serve with iris' listeners (TCP4,UNIX,TLS,LETSENCRYPT). - VScheme string `yaml:"vScheme"` + VScheme string `yaml:"VScheme"` // ReadTimeout is the maximum duration before timing out read of the request. - ReadTimeout time.Duration `yaml:"readTimeout"` + ReadTimeout time.Duration `yaml:"ReadTimeout"` // WriteTimeout is the maximum duration before timing out write of the response. - WriteTimeout time.Duration `yaml:"writeTimeout"` + WriteTimeout time.Duration `yaml:"WriteTimeout"` // MaxHeaderBytes controls the maximum number of bytes the // server will read parsing the request header's keys and // values, including the request line. It does not limit the // size of the request body. // If zero, DefaultMaxHeaderBytes is used. - MaxHeaderBytes int `yaml:"maxHeaderBytes"` + MaxHeaderBytes int `yaml:"MaxHeaderBytes"` // CheckForUpdates will try to search for newer version of Iris based on the https://github.com/kataras/iris/releases // If a newer version found then the app will ask the he dev/user if want to update the 'x' version @@ -130,7 +130,7 @@ type Configuration struct { // Usage: app := iris.New(iris.Configuration{CheckForUpdates: true}) // // Defaults to false. - CheckForUpdates bool `yaml:"checkForUpdates"` + CheckForUpdates bool `yaml:"CheckForUpdates"` // DisablePathCorrection corrects and redirects the requested path to the registered path // for example, if /home/ path is requested but no handler for this Route found, @@ -151,17 +151,17 @@ type Configuration struct { // projectName, _ := url.QueryUnescape(c.Param("project"). // // Defaults to false. - EnablePathEscape bool `yaml:"enablePathEscape"` + EnablePathEscape bool `yaml:"EnablePathEscape"` // FireMethodNotAllowed if it's true router checks for StatusMethodNotAllowed(405) and // fires the 405 error instead of 404 // Defaults to false. - FireMethodNotAllowed bool `yaml:"fireMethodNotAllowed"` + FireMethodNotAllowed bool `yaml:"FireMethodNotAllowed"` // DisableBanner outputs the iris banner at startup // // Defaults to false. - DisableBanner bool `yaml:"disableBanner"` + DisableBanner bool `yaml:"DisableBanner"` // DisableBodyConsumptionOnUnmarshal manages the reading behavior of the context's body readers/binders. // If setted to true then it @@ -171,29 +171,29 @@ type Configuration struct { // if this field setted to true then a new buffer will be created to read from and the request body. // The body will not be changed and existing data before the // context.UnmarshalBody/ReadJSON/ReadXML will be not consumed. - DisableBodyConsumptionOnUnmarshal bool `yaml:"disableBodyConsumptionOnUnmarshal"` + DisableBodyConsumptionOnUnmarshal bool `yaml:"DisableBodyConsumptionOnUnmarshal"` // TimeFormat time format for any kind of datetime parsing // Defauls to "Mon, 02 Jan 2006 15:04:05 GMT". - TimeFormat string `yaml:"timeFormat"` + TimeFormat string `yaml:"TimeFormat"` // Charset character encoding for various rendering // used for templates and the rest of the responses // Defaults to "UTF-8". - Charset string `yaml:"charset"` + Charset string `yaml:"Charset"` // Gzip enables gzip compression on your Render actions, this includes any type of render, // templates and pure/raw content // If you don't want to enable it globally, you could just use the third parameter // on context.Render("myfileOrResponse", structBinding{}, iris.RenderOptions{"gzip": true}) // Defaults to false. - Gzip bool `yaml:"gzip"` + Gzip bool `yaml:"Gzip"` // Other are the custom, dynamic options, can be empty. // This field used only by you to set any app's options you want // or by custom adaptors, it's a way to simple communicate between your adaptors (if any) // Defaults to a non-nil empty map. - Other map[string]interface{} `yaml:"other"` + Other map[string]interface{} `yaml:"Other"` } // Set implements the OptionSetter diff --git a/configuration_test.go b/configuration_test.go index 2d4bc8a5..85593ec0 100644 --- a/configuration_test.go +++ b/configuration_test.go @@ -103,33 +103,20 @@ func TestConfigurationYAML(t *testing.T) { }() yamlConfigurationContents := ` - vHost: iris-go.com - - vScheme: https:// - - readTimeout: 0 - - writeTimeout: 5s - - maxHeaderBytes: 8096 - - checkForUpdates: true - - disablePathCorrection: false - - enablePathEscape: false - - fireMethodNotAllowed: true - - disableBanner: true - - disableBodyConsumptionOnUnmarshal: true - - timeFormat: Mon, 01 Jan 2006 15:04:05 GMT - - charset: UTF-8 - - gzip: true + VHost: iris-go.com + VScheme: https:// + ReadTimeout: 0 + WriteTimeout: 5s + MaxHeaderBytes: 8096 + CheckForUpdates: true + DisablePathCorrection: false + EnablePathEscape: false + FireMethodNotAllowed: true + DisableBanner: true + DisableBodyConsumptionOnUnmarshal: true + TimeFormat: Mon, 01 Jan 2006 15:04:05 GMT + Charset: UTF-8 + Gzip: true ` yamlFile.WriteString(yamlConfigurationContents)