Otherwise some OS X toolchains complain about the redeclaration
of libcgo_thread_start by multiple object files. The real definition
is in util.c.
Fixes#2167.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5364045
This CL adds an API for handling the various SSH
authenticaton methods. None and password continue
to be the only supported methods.
R=bradfitz, agl, n13m3y3r, rsc, cw
CC=golang-dev
https://golang.org/cl/5328045
- 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