|
4 | 4 |
|
5 | 5 | * [x] Make `uri.URI` a concrete type |
6 | 6 | * In theory, this is a breaking change, but has most likely little impact on actual usage |
| 7 | + * [x] Checked that this wouldn't break fyne-io/fyne |
7 | 8 |
|
8 | 9 | * [x] The interface abstraction comes at a (small) performance cost, and there is no palatable benefit from it |
9 | | - * More methods from `URL` should be supported by `URI`, e.g. `UnmarshalText()`, `MarshalBinary()`, `Redacted()`, `IsAbs()`... |
| 10 | + * More methods from `URL` should be supported by `URI`, e.g. : |
| 11 | + * [x] `UnmarshalText()`, |
| 12 | + * [x] `MarshalBinary()`, |
| 13 | + * `Redacted()`, `IsAbs()`... |
10 | 14 | * Similarly, support more methods from `net/url.UserInfo` in the `Authority` type. |
11 | 15 | * However: |
12 | | - * Let's keep the `Authority` part, as it better sticks to how the object is structured according to the RFC. |
13 | | - * Let's keep the fluent `Builder` component. I don't think that exposing fields like in `URL` is a good choice. |
| 16 | + * [x] Let's keep the `Authority` part, as it better sticks to how the object is structured according to the RFC. |
| 17 | + * [x] Let's keep the fluent `Builder` component. I don't think that exposing fields like in `URL` is a good choice. |
| 18 | + * [x] Remove `Authority` and `Builder` interfaces. |
14 | 19 |
|
15 | 20 | ## Canonicalization |
16 | | - * Extra feature: no breaking change |
| 21 | + * Extra features only: no breaking change |
17 | 22 |
|
18 | | - * `URI.String()` currently just prints out the URL. We may leave it like this. |
19 | | - * A `Normalize()` method should canonicalize the URI (case, simplified path, etc), like the `purell` package does. |
| 23 | + * [x] `URI.String()` currently just prints out the URL. We may leave it like this. |
| 24 | + * `Normalize()` and `Normaized()` methods should canonicalize the URI (case, simplified path, etc), like the `purell` package does. |
20 | 25 | Notice that `purell` seems to be no longer maintained: pulling a dependency is probably not appropriate. |
21 | 26 |
|
22 | 27 | ## Strictness/compliance options |
|
29 | 34 | * callers should be able to opt in for IRI vs strict (historical) URI - e.g. only ASCII - rather than the current mixed |
30 | 35 | implementation (yet again, that was a pragmatic... still pondering if putting more nitpicking is appropriate). |
31 | 36 | * [x] callers should be able to configure DNS schemes from options rather than overriding a package-level variable |
32 | | - * default options could be set at the package level to save on systematic option resolution at parsing time |
| 37 | + * [x] default options could be set at the package level to save on systematic option resolution at parsing time |
33 | 38 | (alternatively, expose a `Parser` type to wrap options once for a series of subsequent calls to `Parse()`/`Validate()`) |
34 | 39 | * support canonicalization options with flags such as those defined in `https://pkg.go.dev/golang.org/x/net/idna` |
| 40 | + * add windows-friendly tolerance option for windows file paths (`Normalize()` would produce a RFC-compliant form) |
35 | 41 |
|
36 | 42 | * Standard compliance improvements |
37 | 43 | * Improve IRI support: current support for IRI is at best loose, albeit pragmatic |
38 | 44 | (currently, a valid ALPHA token is a unicode letter codepoint, only ASCII digits are supported) |
39 | 45 |
|
| 46 | +## Performance |
| 47 | + * Introduce `Make` methods to return a struct rather than a pointer: this saves an allocation |
| 48 | + for most use cases in which it is not necessary to get a pointer receiver. |
0 commit comments