github.com/System-Glitch/goyave/v2@v2.10.3-0.20200819142921-51011e75d504/docs/guide/changelog.html (about)

     1  <!DOCTYPE html>
     2  <html lang="en-US">
     3    <head>
     4      <meta charset="utf-8">
     5      <meta name="viewport" content="width=device-width,initial-scale=1">
     6      <title>Changelog | Goyave</title>
     7      <meta name="generator" content="VuePress 1.5.3">
     8      <link rel="icon" type="image/png" sizes="16x16" href="/goyave/goyave_16.png">
     9      <link rel="icon" type="image/png" sizes="32x32" href="/goyave/goyave_32.png">
    10      <link rel="icon" type="image/png" sizes="64x64" href="/goyave/goyave_64.png">
    11      <link rel="icon" type="image/png" sizes="128x128" href="/goyave/goyave_128.png">
    12      <link rel="icon" type="image/png" sizes="256x256" href="/goyave/goyave_256.png">
    13      <link rel="icon" type="image/png" sizes="512x512" href="/goyave/goyave_512.png">
    14      <meta name="description" content="Goyave is a Golang web API framework aiming at cleanliness, fast development and power.">
    15      <meta name="og:title" content="Changelog - Goyave">
    16      <meta name="twitter:title" content="Changelog - Goyave">
    17      <meta name="title" content="Changelog - Goyave">
    18      <meta property="twitter:description" content="Goyave is a Golang web API framework aiming at cleanliness, fast development and power.">
    19      <meta property="twitter:image:src" content="https://system-glitch.github.io/goyave/goyave_banner.png">
    20      <meta property="twitter:card" content="summary_large_image">
    21      <meta property="og:type" content="website">
    22      <meta property="og:description" content="Goyave is a Golang web API framework aiming at cleanliness, fast development and power.">
    23      <meta property="og:image" content="https://system-glitch.github.io/goyave/goyave_banner.png">
    24      <meta property="og:site_name" content="Goyave">
    25      <link rel="preload" href="/goyave/assets/css/0.styles.589fd562.css" as="style"><link rel="preload" href="/goyave/assets/js/app.092490a7.js" as="script"><link rel="preload" href="/goyave/assets/js/4.75a9cc68.js" as="script"><link rel="preload" href="/goyave/assets/js/1.121dd9ed.js" as="script"><link rel="preload" href="/goyave/assets/js/24.1a4755e7.js" as="script"><link rel="prefetch" href="/goyave/assets/js/10.2f07bbf5.js"><link rel="prefetch" href="/goyave/assets/js/11.2d66fdef.js"><link rel="prefetch" href="/goyave/assets/js/12.63171b15.js"><link rel="prefetch" href="/goyave/assets/js/13.770050f3.js"><link rel="prefetch" href="/goyave/assets/js/14.b933d8cf.js"><link rel="prefetch" href="/goyave/assets/js/15.36df2a66.js"><link rel="prefetch" href="/goyave/assets/js/16.ed66719e.js"><link rel="prefetch" href="/goyave/assets/js/17.7bef5f05.js"><link rel="prefetch" href="/goyave/assets/js/18.470b55ed.js"><link rel="prefetch" href="/goyave/assets/js/19.90e0dab8.js"><link rel="prefetch" href="/goyave/assets/js/20.3a300ca3.js"><link rel="prefetch" href="/goyave/assets/js/21.c3fd6053.js"><link rel="prefetch" href="/goyave/assets/js/22.d5569617.js"><link rel="prefetch" href="/goyave/assets/js/23.931b2034.js"><link rel="prefetch" href="/goyave/assets/js/25.0d463913.js"><link rel="prefetch" href="/goyave/assets/js/26.3c173a7a.js"><link rel="prefetch" href="/goyave/assets/js/27.9c5b36f2.js"><link rel="prefetch" href="/goyave/assets/js/28.41e055b7.js"><link rel="prefetch" href="/goyave/assets/js/29.b87adf4a.js"><link rel="prefetch" href="/goyave/assets/js/3.ef71e77d.js"><link rel="prefetch" href="/goyave/assets/js/5.c83f1192.js"><link rel="prefetch" href="/goyave/assets/js/6.2336bf0c.js"><link rel="prefetch" href="/goyave/assets/js/7.d60e55c1.js"><link rel="prefetch" href="/goyave/assets/js/8.2ee33a42.js"><link rel="prefetch" href="/goyave/assets/js/9.8e043d60.js">
    26      <link rel="stylesheet" href="/goyave/assets/css/0.styles.589fd562.css">
    27    </head>
    28    <body>
    29      <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/goyave/" class="home-link router-link-active"><img src="/goyave/goyave_64.png" alt="Goyave" class="logo"> <span class="site-name can-hide">Goyave</span></a> <div class="links"><div class="user-settings"><a title="Dark theme" href="#" class="settings-button"><svg aria-hidden="true" data-prefix="fas" data-icon="cog" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="svg-inline--fa fa-cog fa-w-16 settings-icon"><path fill="currentColor" d="M8 0c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zM8 15c-3.9 0-7-3.1-7-7 0-2.4 1.2-4.6 3.2-5.9-0.1 0.6-0.2 1.3-0.2 1.9 0 4.9 4 8.9 8.9 9-1.3 1.3-3 2-4.9 2z"></path></svg></a></div> <div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/goyave/guide/" class="nav-link router-link-active">
    30    Guide
    31  </a></div><div class="nav-item"><a href="https://pkg.go.dev/github.com/System-Glitch/goyave/v2" target="_blank" rel="noopener noreferrer" class="nav-link external">
    32    pkg.go.dev
    33    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/System-Glitch/goyave" target="_blank" rel="noopener noreferrer" class="repo-link">
    34      GitHub
    35      <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/goyave/guide/" class="nav-link router-link-active">
    36    Guide
    37  </a></div><div class="nav-item"><a href="https://pkg.go.dev/github.com/System-Glitch/goyave/v2" target="_blank" rel="noopener noreferrer" class="nav-link external">
    38    pkg.go.dev
    39    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/System-Glitch/goyave" target="_blank" rel="noopener noreferrer" class="repo-link">
    40      GitHub
    41      <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Guide</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/goyave/guide/" aria-current="page" class="sidebar-link">Introduction</a></li><li><a href="/goyave/guide/changelog.html" aria-current="page" class="active sidebar-link">Changelog</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v3-0-0" class="sidebar-link">v3.0.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-10-x" class="sidebar-link">v2.10.x</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-9-0" class="sidebar-link">v2.9.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-8-0" class="sidebar-link">v2.8.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-7-x" class="sidebar-link">v2.7.x</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-6-0" class="sidebar-link">v2.6.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-5-0" class="sidebar-link">v2.5.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-4-x" class="sidebar-link">v2.4.x</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-3-0" class="sidebar-link">v2.3.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-2-x" class="sidebar-link">v2.2.x</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-1-0" class="sidebar-link">v2.1.0</a></li><li class="sidebar-sub-header"><a href="/goyave/guide/changelog.html#v2-0-0" class="sidebar-link">v2.0.0</a></li></ul></li><li><a href="/goyave/guide/installation.html" class="sidebar-link">Installation</a></li><li><a href="/goyave/guide/upgrade-guide.html" class="sidebar-link">Upgrade Guide</a></li><li><a href="/goyave/guide/configuration.html" class="sidebar-link">Configuration</a></li><li><a href="/goyave/guide/architecture-concepts.html" class="sidebar-link">Architecture Concepts</a></li><li><a href="/goyave/guide/deployment.html" class="sidebar-link">Deployment</a></li><li><a href="/goyave/guide/contribution-guide.html" class="sidebar-link">Contributing to Goyave</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>The Basics</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Advanced</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="changelog"><a href="#changelog" class="header-anchor">#</a> Changelog</h1> <p></p><div class="table-of-contents"><ul><li><a href="#v3-0-0">v3.0.0</a></li><li><a href="#v2-10-x">v2.10.x</a><ul><li><a href="#v2-10-2">v2.10.2</a></li><li><a href="#v2-10-1">v2.10.1</a></li><li><a href="#v2-10-0">v2.10.0</a></li></ul></li><li><a href="#v2-9-0">v2.9.0</a></li><li><a href="#v2-8-0">v2.8.0</a></li><li><a href="#v2-7-x">v2.7.x</a><ul><li><a href="#v2-7-1">v2.7.1</a></li><li><a href="#v2-7-0">v2.7.0</a></li></ul></li><li><a href="#v2-6-0">v2.6.0</a></li><li><a href="#v2-5-0">v2.5.0</a></li><li><a href="#v2-4-x">v2.4.x</a><ul><li><a href="#v2-4-3">v2.4.3</a></li><li><a href="#v2-4-2">v2.4.2</a></li><li><a href="#v2-4-1">v2.4.1</a></li><li><a href="#v2-4-0">v2.4.0</a></li></ul></li><li><a href="#v2-3-0">v2.3.0</a></li><li><a href="#v2-2-x">v2.2.x</a><ul><li><a href="#v2-2-1">v2.2.1</a></li><li><a href="#v2-2-0">v2.2.0</a></li></ul></li><li><a href="#v2-1-0">v2.1.0</a></li><li><a href="#v2-0-0">v2.0.0</a></li></ul></div><p></p> <h2 id="v3-0-0"><a href="#v3-0-0" class="header-anchor">#</a> v3.0.0</h2> <ul><li>Changed conventions:
    42  <ul><li><code>validation.go</code> and <code>placeholders.go</code> moved to a new <code>http/validation</code> package.</li> <li>Validation rule sets are now located in a <code>request.go</code> file in the same package as the controller.</li></ul></li></ul> <p><strong>Motivation</strong>: <em>Separating the requests in another package added unnecessary complexity to the directory structure and was not convenient to use. Package naming was far from ideal with the &quot;request&quot; suffix. Moving requests to the same package as the controller is more intuitive and requires less imports and makes route definition cleaner and easier.</em></p> <ul><li>Validation system overhaul, allowing rule sets to be parsed only once instead of every time a request is received, giving better overall performance. This new system also allows a more verbose syntax for validation, solving the comma rule parameter value and a much easier use in your handlers.</li></ul> <p><strong>Motivation</strong>: <em>The validation system had a lot of room for improvement when it comes to performance, as <code>RuleSet</code> were parsed every time a request was received. Moving this process out of the request life-cycle to execute it only once saves a good amount of execution time. Moreover, any handler who would want to read the rules applied to the current request needed to parse them too, which was inconvenient and not effective. With a structure containing everything you need, making middleware interacting with the request's rules is much easier.</em></p> <ul><li>Routing has been improved by changing how validation and route-specific middleware are registered. The signature of the router functions have been simplified by removing the validation and middleware parameters from <code>Route()</code>, <code>Get()</code>, <code>Post()</code>, etc. This is now done through two new chainable methods on the <code>Route</code>: <code>route.Validate()</code> and  <code>route.Middleware()</code>.</li></ul> <p><strong>Motivation</strong>: <em>In the original design, the validation parameter was included in the main route definition function because most routes were expected to be validated, which turned out not to be the case. In a typical CRUD, only the create and update actions are validated, which made the route definition dirty and filled with <code>nil</code> parameters. Separating the rules and middleware definition is more in line with their optional nature and makes routes definition cleaner and more readable, although sometimes slightly longer.</em></p> <ul><li>Log <code>Formatter</code> now receive the length of the response (in bytes) instead of the full body.</li></ul> <p><strong>Motivation:</strong> <em>Keeping in memory the full response has an important impact on memory when sending files or large responses. Using the response content in a log formatter is also a marginal use-case which doesn't justify the performance loss described previously. It is still possible to retrieve the content of the response by writing your own chained writer.</em></p> <ul><li>Configuration system has been revamped.
    43  <ul><li>Added support for tree-like configurations, allowing for better categorization. Nested values can be accessed using dot-separated path.</li> <li>Improved validation: nested entries can now be validated too and all entries can have authorized values. Optional entries can now be validated too.</li> <li>Entries that are validated with the <code>int</code> type are now automatically converted from <code>float64</code> if they don't have decimal places. It is no longer necessary to manually cast <code>float64</code> that are supposed to be integers.</li> <li>More openness: entries can be registered with a default value, their type and authorized values from any package. This allows config entries required by a specific package to be loaded only if the latter is imported.</li> <li>Core configuration has been sorted in categories. This is a breaking change that will require you to update your configuration files.</li> <li>Entries having a <code>nil</code> value are now considered unset.</li> <li>Added accessors <code>GetInt()</code> and <code>GetFloat()</code>.</li> <li>Added <code>LoadFrom()</code>, letting you load a configuration file from a custom path.</li> <li>Bug fix: <code>config.IsLoaded()</code> returned <code>true</code> even if config failed to load.</li></ul></li></ul> <p><strong>Motivation:</strong> <em>Configuration was without a doubt one of the weakest and inflexible feature of the framework. It was possible to use objects in custom entries, but not for core config, but it was inconvenient because it required a lot of type assertions. Moreover, core config entries were not handled the same as custom ones, which was a lack of openness. Hopefully, this revamped system will cover more potential use-cases, ease plugin development and allow you to produce cleaner code and configuration files.</em></p> <ul><li>Rule functions don't check required parameters anymore. This is now done when the rules are parsed at startup time. The amount of required parameters is given when registering a new rule.</li> <li>Optimized regex-based validation rules by compiling expressions once.</li> <li>A significant amount of untested cases are now tested.</li> <li>Protect the database instance with mutex.</li> <li>Recovery middleware now correctly handles panics with a <code>nil</code> value.</li> <li>The following rules now pass if the validated data type is not supported: <code>greater_than</code>, <code>greater_than_equal</code>, <code>lower_than</code>, <code>lower_than_equal</code>, <code>size</code>.</li> <li>Type-dependent rules now try to determine what is the expected type by looking up in the rule set for a type rule. If no type rule is present, falls back to the inputted type. This change makes it so the validation message is correct even if the client didn't input the expected type.</li> <li>Fixed a bug triggering a panic if the client inputted a non-array value in an array-validated field.</li> <li><code>response.Render</code> and <code>response.RenderHTML</code> now execute and write the template to a <code>bytes.Buffer</code> instead of directly to the <code>goyave.Response</code>. This allows to catch and handle errors before the response header has been written, in order to return an error 500 if the template doesn't execute properly for example.</li> <li>Test can now be run without the <code>-p 1</code> flag thanks to a lock added to the <code>goyave.RunTest</code> method. Therefore, <code>goyave.TestSuite</code> still <strong>don't run in parallel</strong> but are safe to use with the typical test command.</li> <li><code>maxUploadSize</code> config entry now supports decimal places.</li></ul> <h2 id="v2-10-x"><a href="#v2-10-x" class="header-anchor">#</a> v2.10.x</h2> <h3 id="v2-10-2"><a href="#v2-10-2" class="header-anchor">#</a> v2.10.2</h3> <ul><li>Fixed a bug in body parsing middleware preventing json body to be parsed if a charset was provided.</li></ul> <h3 id="v2-10-1"><a href="#v2-10-1" class="header-anchor">#</a> v2.10.1</h3> <ul><li>Changed the behavior of <code>response.File()</code> and <code>response.Download()</code> to respond with a status 404 if the given file doesn't exist instead of panicking.</li> <li>Improved error handling:
    44  <ul><li><code>log.Panicf</code> is not used anymore to print panics, removing possible duplicate logs.</li> <li>Added error checks during automatic migrations.</li> <li><code>goyave.Start()</code> now exits the program with the following error codes:
    45  <ul><li><code>2</code>: Panic (server already running, error when loading language files, etc)</li> <li><code>3</code>: Configuration is invalid</li> <li><code>4</code>: An error occurred when opening network listener</li> <li><code>5</code>: An error occurred in the HTTP server</li></ul></li></ul></li></ul> <p>This change will require a slightly longer <code>main</code> function but offers better flexibility for error handling and multi-services.</p> <div class="language-go extra-class"><pre class="language-go"><code><span class="token keyword">if</span> err <span class="token operator">:=</span> goyave<span class="token punctuation">.</span><span class="token function">Start</span><span class="token punctuation">(</span>route<span class="token punctuation">.</span>Register<span class="token punctuation">)</span><span class="token punctuation">;</span> err <span class="token operator">!=</span> <span class="token boolean">nil</span> <span class="token punctuation">{</span>
    46  	os<span class="token punctuation">.</span><span class="token function">Exit</span><span class="token punctuation">(</span>err<span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token operator">*</span>goyave<span class="token punctuation">.</span>Error<span class="token punctuation">)</span><span class="token punctuation">.</span>ExitCode<span class="token punctuation">)</span>
    47  <span class="token punctuation">}</span>
    48  </code></pre></div><ul><li>Fixed a bug in <code>TestSuite</code>: HTTP client was re-created everytime <code>getHTTPClient()</code> was called.</li> <li>Fixed testing documentation examples that didn't close http response body.</li> <li>Documentation meta improvements.</li> <li>Protect JSON requests with <code>maxUploadSize</code>.</li> <li>The server will now automatically return <code>413 Payload Too Large</code> if the request's size exceeds the <code>maxUploadSize</code> defined in configuration.</li> <li>The request parsing middleware doesn't drain the body anymore, improving native handler compatibility.</li> <li>Set a default status handler for all 400 errors.</li> <li>Fixed a bug preventing query parameters to be parsed when the request had the <code>Content-Type: application/json</code> header.</li> <li>Added a dark theme for the documentation. It can be toggled by clicking the moon icon next to the search bar.</li></ul> <h3 id="v2-10-0"><a href="#v2-10-0" class="header-anchor">#</a> v2.10.0</h3> <ul><li>Added router <code>Get</code>, <code>Post</code>, <code>Put</code>, <code>Patch</code>, <code>Delete</code> and <code>Options</code> methods to register routes directly without having to specify a method string.</li> <li>Added <a href="/goyave/guide/advanced/localization.html#placeholders">placeholder</a> support in regular language lines.</li></ul> <h2 id="v2-9-0"><a href="#v2-9-0" class="header-anchor">#</a> v2.9.0</h2> <ul><li>Added <a href="/goyave/guide/basics/database.html#hidden-fields">hidden fields</a>.</li> <li>Entirely removed Gorilla mux. This change is not breaking: native middleware still work the same.</li></ul> <h2 id="v2-8-0"><a href="#v2-8-0" class="header-anchor">#</a> v2.8.0</h2> <ul><li>Added a built-in logging system.
    49  <ul><li>Added a middleware for access logs using the Common Log Format or Combined Log Format. This allows custom formatters too.</li> <li>Added three standard loggers: <code>goyave.Logger</code>, <code>goyave.AccessLogger</code> and <code>goyave.ErrLogger</code></li></ul></li> <li>Fixed bug: the gzip middleware now closes underlying writer on close.</li></ul> <h2 id="v2-7-x"><a href="#v2-7-x" class="header-anchor">#</a> v2.7.x</h2> <h3 id="v2-7-1"><a href="#v2-7-1" class="header-anchor">#</a> v2.7.1</h3> <ul><li>Changed MIME type of <code>js</code> and <code>mjs</code> files to <code>text/javascript</code>. This is in accordance with an <a href="https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/" target="_blank" rel="noopener noreferrer">IETF draft<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> that treats application/javascript as obsolete.</li> <li>Improved error handling: stacktrace wasn't relevant on unexpected panic since it was retrieved from the route's request handler therefore not including the real source of the panic. Stacktrace retrieval has been moved to the recovery middleware to fix this.</li></ul> <h3 id="v2-7-0"><a href="#v2-7-0" class="header-anchor">#</a> v2.7.0</h3> <ul><li>Added <code>Request.Request()</code> accessor to get the raw <code>*http.Request</code>.</li> <li>Fixed a bug allowing non-core middleware applied to the root router to be executed when the &quot;Not Found&quot; or &quot;Method Not Allowed&quot; routes were matched.</li> <li>Fixed a bug making route groups (sub-routers with empty prefix) conflict with their parent router when two routes having the same path but different methods are registered in both routers.</li> <li>Added <a href="/goyave/guide/basics/responses.html#chained-writers">chained writers</a>.</li> <li>Added <a href="/goyave/guide/basics/middleware.html#gzip">gzip compression middleware</a>.</li> <li>Added the ability to register route-specific middleware in <code>Router.Static()</code>.</li></ul> <h2 id="v2-6-0"><a href="#v2-6-0" class="header-anchor">#</a> v2.6.0</h2> <ul><li>Custom router implementation. Goyave is not using gorilla/mux anymore. The new router is twice as fast and uses about 3 times less memory.</li> <li>Now redirects to configured protocol if request scheme doesn't match.</li> <li>Added <a href="/goyave/guide/basics/routing.html#named-routes">named routes</a>.</li> <li>Added <code>Route.GetFullURI()</code> and <code>Route.BuildURL()</code> for dynamic URL generation.</li> <li>Added <code>helper.IndexOfStr()</code> and <code>helper.ContainsStr()</code> for better performance when using string slices.</li> <li>Moved from GoDoc to <a href="https://pkg.go.dev/github.com/System-Glitch/goyave/v2" target="_blank" rel="noopener noreferrer">pkg.go.dev<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>.</li> <li>Print errors to stderr.</li></ul> <h2 id="v2-5-0"><a href="#v2-5-0" class="header-anchor">#</a> v2.5.0</h2> <ul><li>Added an <a href="/goyave/guide/advanced/authentication.html">authentication system</a>.</li> <li>Various optimizations.</li> <li>Various documentation improvements.</li> <li>Added <code>dbMaxLifetime</code> configuration entry.</li> <li>Moved from Travis CI to Github Actions.</li> <li>Fixed a bug making duplicate log entries on error.</li> <li>Fixed a bug preventing language lines containing a dot to be retrieved.</li> <li>Fixed <code>TestSuite.GetJSONBody()</code> not working with structs and slices.</li> <li>Added <code>TestSuite.ClearDatabaseTables()</code>.</li> <li>Added <code>Config.Has()</code> and <code>Config.Register()</code> to check for the existence of a config entry and to allow custom config entries valdiation.</li> <li>Added <code>Request.BearerToken()</code>.</li> <li>Added <code>Response.HandleDatabaseError()</code> for easier database error handling and shorter controller handlers.</li></ul> <h2 id="v2-4-x"><a href="#v2-4-x" class="header-anchor">#</a> v2.4.x</h2> <h3 id="v2-4-3"><a href="#v2-4-3" class="header-anchor">#</a> v2.4.3</h3> <ul><li>Improved string validation by taking grapheme clusters into consideration when calculating length.</li> <li><code>lang.LoadDefault</code> now correctly creates a fresh language map and clones the default <code>en-US</code> language. This avoids the default language entries to be overridden permanently.</li></ul> <h3 id="v2-4-2"><a href="#v2-4-2" class="header-anchor">#</a> v2.4.2</h3> <ul><li>Don't override <code>Content-Type</code> header when sending a file if already set.</li> <li>Fixed a bug with validation message placeholder <code>:values</code>, which was mistakenly using the <code>:value</code> placeholder.</li></ul> <h3 id="v2-4-1"><a href="#v2-4-1" class="header-anchor">#</a> v2.4.1</h3> <ul><li>Bundle default config and language in executable to avoid needing to deploy <code>$GOROOT/pkg/mod/github.com/!system-!glitch/goyave/</code> with the application.</li></ul> <h3 id="v2-4-0"><a href="#v2-4-0" class="header-anchor">#</a> v2.4.0</h3> <ul><li>Added <a href="/goyave/guide/basics/responses.html#response-render">template rendring</a>.</li> <li>Fixed PostgreSQL options not working.</li> <li><code>TestSuite.Middleware()</code> now has a more realistic behavior: the finalization step of the request life-cycle is now also executed. This may require your tests to be updated if those check the status code in the response.</li> <li>Added <a href="/goyave/guide/advanced/status-handlers.html">status handlers</a>.</li></ul> <h2 id="v2-3-0"><a href="#v2-3-0" class="header-anchor">#</a> v2.3.0</h2> <ul><li>Added <a href="/goyave/guide/advanced/cors.html">CORS options</a>.</li></ul> <h2 id="v2-2-x"><a href="#v2-2-x" class="header-anchor">#</a> v2.2.x</h2> <h3 id="v2-2-1"><a href="#v2-2-1" class="header-anchor">#</a> v2.2.1</h3> <ul><li>Added <code>domain</code> config entry. This entry is used for url generation, especially for the TLS redirect.</li> <li>Don't show port in TLS redirect response if ports are standard (80 for HTTP, 443 for HTTPS).</li></ul> <h3 id="v2-2-0"><a href="#v2-2-0" class="header-anchor">#</a> v2.2.0</h3> <ul><li>Added <a href="/goyave/guide/advanced/testing.html">testing API</a>.</li> <li>Fixed links in documentation.</li> <li>Fixed <code>models</code> package in template project. (Changed to <code>model</code>)</li> <li>Added <a href="/goyave/guide/basics/database.html#database-clearregisteredmodels"><code>database.ClearRegisteredModels</code></a></li></ul> <h2 id="v2-1-0"><a href="#v2-1-0" class="header-anchor">#</a> v2.1.0</h2> <ul><li><code>filesystem.GetMIMEType</code> now detects <code>css</code>, <code>js</code>, <code>json</code> and <code>jsonld</code> files based on their extension.</li> <li>Added maintenance mode.
    50  <ul><li>Can be <a href="/goyave/guide/advanced/multi-services.html#maintenance-mode">toggled at runtime</a>.</li> <li>The server can be started in maintenance mode using the <code>maintenance</code> config option. (Defaults to <code>false</code>)</li></ul></li> <li>Added <a href="/goyave/guide/basics/validation.html#validating-arrays">advanced array validation</a>, with support for n-dimensional arrays.</li> <li>Malformed request messages can now be localized. (<code>malformed-request</code> and <code>malformed-json</code> entries in <code>locale.json</code>)</li> <li>Modified the validator to allow <a href="/goyave/guide/basics/validation.html#manual-validation">manual validation</a>.</li></ul> <h2 id="v2-0-0"><a href="#v2-0-0" class="header-anchor">#</a> v2.0.0</h2> <ul><li>Documentation and README improvements.</li> <li>In the configuration:
    51  <ul><li>The default value of <code>dbConnection</code> has been changed to <code>none</code>.</li> <li>The default value of <code>dbAutoMigrate</code> has been changed to <code>false</code>.</li></ul></li> <li>Added <a href="/goyave/guide/basics/requests.html#accessors">request data accessors</a>.</li> <li>Some refactoring and package renaming have been done to better respect the Go conventions.
    52  <ul><li>The <code>helpers</code> package have been renamed to <code>helper</code></li></ul></li> <li>The server now shuts down when it encounters an error during startup.</li> <li>New <a href="/goyave/guide/basics/validation.html#validation-getfieldtype"><code>validation.GetFieldType</code></a> function.</li> <li>Config and Lang are now protected with a <code>sync.RWMutex</code> to avoid data races in multi-threaded environments.</li> <li>Greatly improve concurrency.</li> <li>Config can now be reloaded manually.</li> <li>Added the <a href="/goyave/guide/basics/middleware.html#trim"><code>Trim</code></a> middleware.</li> <li><code>goyave.Response</code> now implements <code>http.ResponseWriter</code>.
    53  <ul><li>All writing functions can now return an error.</li></ul></li> <li>Added the <a href="/goyave/guide/basics/routing.html#native-handlers"><code>NativeHandler</code></a> compatibility layer.</li> <li>Fixed a bug preventing the static resources handler to find <code>index.html</code> if a directory with a depth of one was requested without a trailing slash.</li> <li>Now panics when calling <code>Start()</code> while the server is already running.</li></ul></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/System-Glitch/goyave/edit/master/docs_src/src/guide/changelog.md" target="_blank" rel="noopener noreferrer">Edit this page on GitHub</a> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></div> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
    54        ←
    55        <a href="/goyave/guide/" class="prev router-link-active">
    56          Introduction
    57        </a></span> <span class="next"><a href="/goyave/guide/installation.html">
    58          Installation
    59        </a>
    60        →
    61      </span></p></div> </main></div><div class="global-ui"><!----></div></div>
    62      <script src="/goyave/assets/js/app.092490a7.js" defer></script><script src="/goyave/assets/js/4.75a9cc68.js" defer></script><script src="/goyave/assets/js/1.121dd9ed.js" defer></script><script src="/goyave/assets/js/24.1a4755e7.js" defer></script>
    63    </body>
    64  </html>