Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.
R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
Somewhat of a work-in-progress (in that MIME is a large spec), but this is
functional and enough for discussion and/or code review.
In addition to the unit tests, I've tested with curl and Chrome with
a variety of test files, making sure the digests of files are unaltered
when read via a multipart Part.
R=rsc, adg, dsymonds1, agl1
CC=golang-dev
https://golang.org/cl/1681049
- go/ast: removed StringList (not needed anymore)
- go/ast: changed import path and field list tag to a single string
- updated all dependencies
R=rsc
CC=golang-dev
https://golang.org/cl/217056
Emphasis on minimal interface and fast scanning.
Recognizes all Go literals by default. Easily
configurable to recognize different whitespace
characters and tokens.
Provides detailed position information for each
token.
R=rsc, r
CC=golang-dev
https://golang.org/cl/181160
Manual changes to the following files:
src/pkg/Makefile
src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile)
R=rsc, r
CC=golang-dev
https://golang.org/cl/181041
This is not a complete JPEG implementation (e.g. it does not handle
progressive JPEGs or restart markers), but I was able to take a photo
with my phone, and view the resultant JPEG in pure Go.
The decoder is simple, but slow. The Huffman decoder in particular
should be easily improvable, but optimization is left to future
changelists. Being able to inline functions in the inner loop should
also help performance.
The output is not pixel-for-pixel identical to libjpeg, although
identical behavior isn't necessarily a goal, since JPEG is a lossy
codec. There are at least two reasons for the discrepancy.
First, the inverse DCT algorithm used is the same as Plan9's
src/cmd/jpg, which has different rounding errors from libjpeg's
default IDCT implementation. Note that libjpeg actually has three
different IDCT implementations: one floating point, and two fixed
point. Out of those four, Plan9's seemed the simplest to understand,
partly because it has no #ifdef's or C macros.
Second, for 4:2:2 or 4:2:0 chroma sampling, this implementation does
nearest neighbor upsampling, compared to libjpeg's triangle filter
(e.g. see h2v1_fancy_upsample in jdsample.c).
The difference from the first reason is typically zero, but sometimes
1 (out of 256) in YCbCr space, or double that in RGB space. The
difference from the second reason can be as large as 8/256 in YCbCr
space, in regions of steep chroma gradients. Informal eyeballing
suggests that the net difference is typically imperceptible, though.
R=r
CC=golang-dev, rsc
https://golang.org/cl/164056
- oldparser parse old syntax (required semicolons)
- oldprinter print old syntax (required semicolons)
By default, these flags are enabled for now.
Setting -oldparser=false has no effect until go/parser is changed
to accept the new syntax.
Enabled exp/parser in Makefile; update dependent exp/eval.
R=rsc
https://golang.org/cl/174051
The python script needs a checkout of xcb/proto to generate
an xproto.go file, which together with xgb.go provide functions
to access all of the core X11 protocol requests. I have included the
generated file.
Extensions and authentication methods are not implemented.
R=r, rsc, nigeltao_golang
https://golang.org/cl/162053
before this change, if pkg/Make.deps is missing or broken, clean.bash fails and the build dies
but not until much later.
add freebsd to error message about valid values of $GOOS
TODO: would be nice if this process exited when an error occurred. subshells make it hard
R=rsc
CC=golang-dev
https://golang.org/cl/160065
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.
this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.
Fixes#115.
R=rsc, dsymonds1
https://golang.org/cl/157067
Meant as illustration of the Go pattern that is using
goroutines and channels to handle exceptional situations.
Note: There is no need for "Finally" since the
"try block" (the function f supplied to Try)
cannot do a Smalltalk-style non-local return
and terminate the function surrounding Try.
Replaces CL 157083.
R=r, rsc
https://golang.org/cl/157087
Make RSA and X509 build by using big. (This involves commenting out
key generation for now since I haven't written Miller-Rabin in big
yet.)
Add entries to the Makefile.
R=rsc
CC=go-dev
http://go/go-review/1022005
Also add git version of base85,
which is what I really wanted but
didn't recognize as different until it
was too late.
R=austin
DELTA=980 (972 added, 4 deleted, 4 changed)
OCL=35580
CL=35921
- renamed Program -> SourceFile
- added Package node representing the AST for an entire package
- added filter function to create a source file mimicking the
interface of an entire package
parser:
- parser entry to parse entire packages
- unified naming of parser entry points
- factored out entry points into new file (interface.go)
gofmt:
- extended to accept single .go files, and package paths:
gofmt file.go // formatting of a single file
gofmt -x file.go // interface of a single file
gofmt -x ./MyPackage // interface of a local package
gofmt -x math // interface of a $GOROOT relative package
Various adjustments in dependent files, documentation.
R=rsc
DELTA=634 (369 added, 153 deleted, 112 changed)
OCL=31743
CL=31748
- replacement for pretty; app to format a single .go file
printer.go (pkg/go/printer):
- replacement for astprinter.go; implements AST printing
- also replaces pkg/go/ast/format.go for now
cleanups:
- removed/saved away old code
R=r,rsc,iant
DELTA=2833 (1183 added, 1628 deleted, 22 changed)
OCL=30226
CL=30306