Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go 1.9 #110

Open
vtolstov opened this issue Jun 11, 2022 · 0 comments
Open

go 1.9 #110

vtolstov opened this issue Jun 11, 2022 · 0 comments

Comments

@vtolstov
Copy link
Member

[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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant