go 1.9 #110

Closed
opened 2022-06-11 15:30:37 +03:00 by vtolstov · 0 comments
vtolstov commented 2022-06-11 15:30:37 +03:00 (Migrated from github.com)
[flag](https://tip.golang.org/pkg/flag/)
The new function [TextVar](https://tip.golang.org/pkg/flag/#TextVar) defines a flag with a value implementing [encoding.TextUnmarshaler](https://tip.golang.org/pkg/encoding/#TextUnmarshaler), allowing command-line flag variables to have types such as [big.Int](https://tip.golang.org/pkg/math/big/#Int), [netip.Addr](https://tip.golang.org/pkg/net/netip/#Addr), and [time.Time](https://tip.golang.org/pkg/time/#Time).

[fmt](https://tip.golang.org/pkg/fmt/)
The new functions [Append](https://tip.golang.org/pkg/fmt/#Append), [Appendf](https://tip.golang.org/pkg/fmt/#Appendf), and [Appendln](https://tip.golang.org/pkg/fmt/#Appendln) append formatted data to byte slices.


[net/url](https://tip.golang.org/pkg/net/url/)
The new [JoinPath](https://tip.golang.org/pkg/net/url/#JoinPath) function and [URL.JoinPath](https://tip.golang.org/pkg/net/url/#URL.JoinPath) method create a new URL by joining a list of path elements.

The URL type now distinguishes between URLs with no authority and URLs with an empty authority. For example, http:///path has an empty authority (host), while http:/path has none.

The new [URL](https://tip.golang.org/pkg/net/url/#URL) field OmitHost is set to true when a URL has an empty authority.



``` [flag](https://tip.golang.org/pkg/flag/) The new function [TextVar](https://tip.golang.org/pkg/flag/#TextVar) defines a flag with a value implementing [encoding.TextUnmarshaler](https://tip.golang.org/pkg/encoding/#TextUnmarshaler), allowing command-line flag variables to have types such as [big.Int](https://tip.golang.org/pkg/math/big/#Int), [netip.Addr](https://tip.golang.org/pkg/net/netip/#Addr), and [time.Time](https://tip.golang.org/pkg/time/#Time). [fmt](https://tip.golang.org/pkg/fmt/) The new functions [Append](https://tip.golang.org/pkg/fmt/#Append), [Appendf](https://tip.golang.org/pkg/fmt/#Appendf), and [Appendln](https://tip.golang.org/pkg/fmt/#Appendln) append formatted data to byte slices. [net/url](https://tip.golang.org/pkg/net/url/) The new [JoinPath](https://tip.golang.org/pkg/net/url/#JoinPath) function and [URL.JoinPath](https://tip.golang.org/pkg/net/url/#URL.JoinPath) method create a new URL by joining a list of path elements. The URL type now distinguishes between URLs with no authority and URLs with an empty authority. For example, http:///path has an empty authority (host), while http:/path has none. The new [URL](https://tip.golang.org/pkg/net/url/#URL) field OmitHost is set to true when a URL has an empty authority. ```
Sign in to join this conversation.
No description provided.