- Fix function prototype for thrsleep().
- Provide enums for clock identifiers.
- Provide timespec structure for use with thrsleep().
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5360042
Use HEADER_IO macro from gopack to read archive header
The HEADER_IO macro portably reads archive headers. The
current arsize code fails in the case of archive headers produced
on plan 9 6c and read on other systems (it's not portable).
Modify lex.c to use the portable macro
Build tested (including tests) on OSX.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5323072
A single character typo ("\n" instead of "\r") meant that
HTML data using DOS line breaks (CRLF) was not detected as HTML.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5365041
Having the compiler count the number of array elements speeds up Gamma from 63.7 to 56.6 ns/op.
R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/5362043
The permitted filename characters should include ~ to allow
the names of user-owned branches in Launchpad.
R=golang-dev, rsc, n13m3y3r, gustavo
CC=golang-dev, gustavo.niemeyer
https://golang.org/cl/5280052
This does escaping on first execution.
template.go defines the same interface elements as package template.
It requires rather more duplication of code than I'd like, but I'm
not clear how to avoid that.
Maybe instead of
mySet.ParseGlob(...)
template.ParseSetGlob(...)
mySet.ParseFiles(...)
mySet.ParseTemplateFiles(...)
template.ParseTemplateFiles(...)
we combine these into a fileset abstraction that can be wrapped
var fileset template.FileSet
fileset.Glob(...) // Load a few files by glob
fileset.Files(...) // Load a few {{define}}d files
fileset.TemplateFiles(...) // Load a few files as template bodies
fileset.Funcs(...) // Make the givens func available to templates
// Do the parsing.
set, err := fileset.ParseSet()
// or set, err := fileset.ParseInto(set)
or provide an interface that can receive filenames and functions and
parse messages:
type Bundle interface {
TemplateFile(string)
File(string)
Funcs(FuncMap)
}
and define template.Parse* to handle the file-system stuff and send
messages to a bundle:
func ParseFiles(b Bundle, filenames ...string)
R=r, r
CC=golang-dev
https://golang.org/cl/5270042
There are three classes of methods/functions called Error:
a) The Error method in the just introduced error interface
b) Error methods that create or report errors (http.Error, etc)
c) Error methods that return errors previously associated with
the receiver (Tokenizer.Error, rows.Error, etc).
This CL introduces the convention that methods in case (c)
should be named Err.
The reasoning for the change is:
- The change differentiates the two kinds of APIs based on
names rather than just on signature, unloading Error a bit
- Err is closer to the err variable name that is so commonly
used with the intent of verifying an error
- Err is shorter and thus more convenient to be used often
on error verifications, such as in iterators following the
convention of the sql package.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5327064
This moves DumpRequest, DumpResponse, NewChunkedReader,
and NewChunkedWriter out of http, as part of the continued
http diet plan.
Also, adds DumpRequestOut (for dumping outbound requests),
since DumpRequest's ambiguity (the "wire representation" in
what direction?) was often a source of confusion and bug
reports.
R=rsc, adg
CC=golang-dev
https://golang.org/cl/5339041
Part of http diet plan.
More of the lesser-used and newcomer-misleading parts of http will
move here.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5336049
runtime knows how to get the time of day
without allocating memory.
R=golang-dev, dsymonds, dave, hectorchu, r, cw
CC=golang-dev
https://golang.org/cl/5297078
This partially undoes 8fd7e6d070c8, but preserves its semantics.
More importantly, it results in the data about each fix being
decentralised, which makes it easier for new fixes to be added,
and other gofix users to slot new fixes in.
It also adds some useful metadata that could be used in the future.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5306092
This is Go 1 package renaming CL #4.
This one merely moves the source; the import strings will be
changed after the next weekly release.
This one moves pieces into os, text, and unicode.
exec -> os/exec
scanner -> text/scanner
tabwriter -> text/tabwriter
template -> text/template
template/parse -> text/template/parse
utf16 -> unicode/utf16
utf8 -> unicode/utf8
This should be the last of the source-rearranging CLs.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5331066
This is Go 1 package renaming CL #3.
This one merely moves the source; the import strings will be
changed after the next weekly release.
This one moves pieces into net.
http -> net/http
http/cgi -> net/http/cgi
http/fcgi -> net/http/fcgi
http/pprof -> net/http/pprof
http/httptest -> net/http/httptest
mail -> net/mail
rpc -> net/rpc
rpc/jsonrpc -> net/rpc/jsonrpc
smtp -> net/smtp
url -> net/url
Also remove rand (now math/rand) from NOTEST - it has a test.
The only edits are in Makefiles and deps.bash.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5335048
This is Go 1 package renaming CL #2.
This one merely moves the source; the import strings will be
changed after the next weekly release.
exp/template/html -> html/template
big -> math/big
cmath -> math/cmplx
rand -> math/rand
syslog -> log/syslog
The only edits are in Makefiles and deps.bash.
Note that this CL moves exp/template/html out of exp. I decided
to do that so all the renamings can be done together, even though
the API (and that of template, for that matter) is still fluid.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5332053
ClientConn's main feature (pipelining support)
wasn't being used anyway. Ends up simpler to
just not use it.
This is prep for the http diet, moving ClientConn,
ServerConn, etc into http/httputil.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5305088
Now that vector is gone, there is no precedent to refer to.
This is a confusing point for people looking to use the
package.
R=golang-dev, r, cw
CC=golang-dev
https://golang.org/cl/5322069
This is Go 1 package renaming CL #1.
This one merely moves the source; the import strings will be
changed after the next weekly release.
The only edits are in Makefiles.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5331060
Fixes#2355.
I have a test, but not sure if it's worth adding. Instead i've made
the patching-over in reflect.c methods more fatal and more descriptive.
R=rsc
CC=golang-dev
https://golang.org/cl/5302082