A FlagSet is an independent set of flags that may be used,
for example, to provide flag processing for subcommands
in a CLI. The standard, os.Args-derived set of flags is a
global but non-exported FlagSet and the standard functions
are wrappers for methods of that FlagSet.
Allow the programmer to control whether the program
exits if there is a parse error. For the default set, the behavior
remains to exit on error.
The handling of Usage is odd due to backward compatibility.
R=golang-dev, bradfitz, r, bradfitz
CC=golang-dev
https://golang.org/cl/4517092
A user pointed out that Go didn't work with their
corp proxy, always throwing 400 Bad Request errors.
Looking at the RFC 2616, Host is always required,
even with proxies.
The old code assumed that writing an absolute URL
in the first line of an HTTP request implied
that the Host header was no longer necessary.
Double-checked behavior with curl.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4539075
Initially I wanted to minimise dependencies but it's become clear that
big int support in ASN.1 is a common need and that it should be part
of the core.
R=bradfitz
CC=golang-dev
https://golang.org/cl/4550063
This change adds a function for generating new Entities and inchoate
support for reserialising Entities.
R=bradfitz, r, bradfitz
CC=golang-dev
https://golang.org/cl/4551044
This appears to have been a long-standing formatting bug.
The test cases has misformatted golden files.
Applied gofmt -w src misc .
Fixes#1839.
R=iant
CC=golang-dev
https://golang.org/cl/4515113
This enables customizing the behavior of formatters
with logic such as {"template"|import} or even
{Field1 Field2 "%.2f 0x%X"|printf}
Thanks to Roger Peppe for some debate on this.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4536059
It's documented as such, but it was never wired up
after Transport went in and Head was fixed.
If people don't want redirects, that's what RoundTripper/
Transport are for. Or a custom redirect policy.
R=golang-dev, kevlar
CC=golang-dev
https://golang.org/cl/4526065
- add Data field to ast.Object
- for package objects, the Data field holds the package scope
- resolve several TODOs
R=rsc
CC=golang-dev
https://golang.org/cl/4538069
When GOMAXPROCS>1, the testing framework runs in parallel with the
test itself and may do a small number of allocations, so allow the
"noAllocs" condition to admit just a few.
Fixes#1782.
R=rsc
CC=golang-dev, rsc
https://golang.org/cl/4533041
The code for converting negative floats was
incorrectly loading an FP control word from
the stack without ever having stored it there.
Thanks to Lars Pensjö for reporting this bug.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4515091
This CL will help to make an adaptive address family
selection possible when an any address family, vague
network string such as "ip", "tcp" or "udp" is passed
to Dial and Listen API.
Fixes#1769.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4438066