to whole-package compilation.
R=r
OCL=33070
CL=33101
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/archive/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- common.$O\
-
-O2=\
- reader.$O\
- writer.$O\
-
-
-phases: a1 a2
-_obj$D/tar.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/tar.a common.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/tar.a reader.$O writer.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/tar.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
-packages: _obj$D/tar.a
+TARG=archive/tar
+GOFILES=\
+ common.go\
+ reader.go\
+ writer.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/tar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
+include $(GOROOT)/src/Make.pkg
// - pax extensions
import (
- "archive/tar";
"bytes";
"io";
"os";
// and then it can be treated as an io.Reader to access the file's data.
//
// Example:
-// tr := tar.NewReader(r);
-// for {
+// tr := tar.NewReader(r);
+// for {
// hdr, err := tr.Next();
// if err != nil {
// // handle error
// break
// }
// io.Copy(tr, data);
-// }
+// }
type Reader struct {
r io.Reader;
err os.Error;
pad int64; // amount of padding (ignored) after current file entry
}
-func (tr *Reader) skipUnread()
-func (tr *Reader) readHeader() *Header
-
// NewReader creates a new Reader reading from r.
func NewReader(r io.Reader) *Reader {
return &Reader{ r: r }
package tar
import (
- "archive/tar";
"bytes";
"fmt";
"io";
// - catch more errors (no first header, write after close, etc.)
import (
- "archive/tar";
"bytes";
"io";
"os";
// writing at most hdr.Size bytes in total.
//
// Example:
-// tw := tar.NewWriter(w);
+// tw := tar.NewWriter(w);
// hdr := new(Header);
// hdr.Size = length of data in bytes;
// // populate other hdr fields as desired
package tar
import (
- "archive/tar";
"bytes";
"fmt";
"io";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- base64.$O\
-
-
-phases: a1
-_obj$D/base64.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/base64.a base64.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/base64.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
-packages: _obj$D/base64.a
+TARG=base64
+GOFILES=\
+ base64.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/base64.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
+include $(GOROOT)/src/Make.pkg
package base64
import (
- "base64";
"bytes";
"io";
"os";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m arith.go bignum.go integer.go rational.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- arith.$O\
-
-O2=\
- bignum.$O\
-
-O3=\
- integer.$O\
-
-O4=\
- rational.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/bignum.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/bignum.a arith.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/bignum.a bignum.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/bignum.a integer.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/bignum.a rational.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/bignum.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
-packages: _obj$D/bignum.a
+TARG=bignum
+GOFILES=\
+ arith.go\
+ bignum.go\
+ integer.go\
+ rational.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/bignum.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
+include $(GOROOT)/src/Make.pkg
package bignum
import (
- "bignum";
"fmt";
)
}
-// MulAdd128 is defined in arith.go and arith.s .
-func MulAdd128(x, y, c uint64) (z1, z0 uint64)
-
// Returns z1 = (x*y + c) div B, z0 = (x*y + c) mod B.
//
func muladd11(x, y, c digit) (digit, digit) {
package bignum
import (
- "bignum";
"fmt";
"testing";
)
package bignum
import (
- "bignum";
"fmt";
)
// (-x) >> s == ^(x-1) >> s == ^((x-1) >> s) == -(((x-1) >> s) + 1)
return MakeInt(true, x.mant.Sub(Nat(1)).Shr(s).Add(Nat(1)));
}
-
+
return MakeInt(false, x.mant.Shr(s));
}
package bignum
-import "bignum"
import "fmt"
// of the numerator is returned. If the mantissa contains a decimal point,
// the base for the fractional part is the same as for the part before the
// decimal point and the fractional part does not accept a base prefix.
-// The base for the exponent is always 10.
+// The base for the exponent is always 10.
//
func RatFromString(s string, base uint) (*Rational, uint, int) {
// read numerator
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- bufio.$O\
-
-
-phases: a1
-_obj$D/bufio.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/bufio.a bufio.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/bufio.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
-packages: _obj$D/bufio.a
+TARG=bufio
+GOFILES=\
+ bufio.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/bufio.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
+include $(GOROOT)/src/Make.pkg
import (
"bytes";
- "bufio";
"fmt";
"io";
"os";
func readRuneSegments(t *testing.T, segments []string) {
got := "";
want := strings.Join(segments, "");
- r := bufio.NewReader(&StringReader{data: segments});
+ r := NewReader(&StringReader{data: segments});
for {
rune, size, err := r.ReadRune();
if err != nil {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/compress/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- inflate.$O\
-
-
-phases: a1
-_obj$D/flate.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/flate.a inflate.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/flate.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
-packages: _obj$D/flate.a
+TARG=compress/flate
+GOFILES=\
+ inflate.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/flate.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
+include $(GOROOT)/src/Make.pkg
import (
"bytes";
"bufio";
- "compress/flate";
"io";
"os";
"reflect";
fixedHuffmanDecoder,
true,
},
-
+
// Illegal input.
&InitDecoderTest{
[]int{ },
buf [4]byte;
}
-func (f *inflater) dataBlock() os.Error
-func (f *inflater) readHuffman() os.Error
-func (f *inflater) decodeBlock(hl, hd *huffmanDecoder) os.Error
-func (f *inflater) moreBits() os.Error
-func (f *inflater) huffSym(h *huffmanDecoder) (int, os.Error)
-func (f *inflater) flush() os.Error
-
func (f *inflater) inflate() (err os.Error) {
final := false;
for err == nil && !final {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/compress/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- gunzip.$O\
-
-
-phases: a1
-_obj$D/gzip.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/gzip.a gunzip.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/gzip.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
-packages: _obj$D/gzip.a
+TARG=compress/gzip
+GOFILES=\
+ gunzip.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/gzip.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
+include $(GOROOT)/src/Make.pkg
eof bool;
}
-func (z *GzipInflater) readHeader(save bool) os.Error
-
// NewGzipInflater creates a new GzipInflater reading the given reader.
// The implementation buffers input and may read more data than necessary from r.
func NewGzipInflater(r io.Reader) (*GzipInflater, os.Error) {
import (
"bytes";
- "compress/gzip";
"fmt";
"io";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- list.$O\
-
-
-phases: a1
-_obj$D/list.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/list.a list.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/list.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
-packages: _obj$D/list.a
+TARG=container/list
+GOFILES=\
+ list.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/list.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
+include $(GOROOT)/src/Make.pkg
package list
import (
- "container/list";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ring.$O\
-
-
-phases: a1
-_obj$D/ring.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ring.a ring.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ring.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
-packages: _obj$D/ring.a
+TARG=container/ring
+GOFILES=\
+ ring.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ring.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
+include $(GOROOT)/src/Make.pkg
package ring
import (
- "container/ring";
"fmt";
"testing";
)
if r.Prev() != r.prev {
t.Errorf("r.Prev() != r.prev");
}
-
+
// Move
if r.Move(0) != r {
t.Errorf("r.Move(0) != r");
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- vector.$O\
-
-O2=\
- intvector.$O\
- stringvector.$O\
-
-
-phases: a1 a2
-_obj$D/vector.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/vector.a vector.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/vector.a intvector.$O stringvector.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/vector.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
-packages: _obj$D/vector.a
+TARG=container/vector
+GOFILES=\
+ intvector.go\
+ stringvector.go\
+ vector.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/vector.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
+include $(GOROOT)/src/Make.pkg
package vector
-import "container/vector"
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
type IntVector struct {
package vector
-import "container/vector"
-
// StringVector is a specialization of Vector that hides the wrapping of Elements around strings.
type StringVector struct {
Vector;
package vector
-import "container/vector"
import "testing"
import "sort"
import "fmt"
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- const.$O\
-
-O2=\
- block.$O\
-
-O3=\
- cipher.$O\
-
-
-phases: a1 a2 a3
-_obj$D/aes.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/aes.a const.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/aes.a block.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/aes.a cipher.$O
- rm -f $(O3)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/aes.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
-packages: _obj$D/aes.a
+TARG=crypto/aes
+GOFILES=\
+ block.go\
+ cipher.go\
+ const.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/aes.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
+include $(GOROOT)/src/Make.pkg
package aes
import (
- "crypto/aes";
"fmt";
"testing";
)
package aes
-import "crypto/aes"
-
// Encrypt one block from src into dst, using the expanded key xk.
func encryptBlock(xk []uint32, src, dst []byte) {
var s0, s1, s2, s3, t0, t1, t2, t3 uint32;
package aes
import (
- "crypto/aes";
"os";
"strconv";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- cipher.$O\
- xor.$O\
-
-O2=\
- cmac.$O\
- ctr.$O\
- ecb.$O\
- ofb.$O\
-
-O3=\
- cbc.$O\
- cfb.$O\
- eax.$O\
-
-
-phases: a1 a2 a3
-_obj$D/block.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/block.a cipher.$O xor.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/block.a cmac.$O ctr.$O ecb.$O ofb.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/block.a cbc.$O cfb.$O eax.$O
- rm -f $(O3)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/block.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
-
-packages: _obj$D/block.a
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/block.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
+TARG=crypto/block
+GOFILES=\
+ cbc.go\
+ cfb.go\
+ cipher.go\
+ cmac.go\
+ ctr.go\
+ eax.go\
+ ecb.go\
+ ofb.go\
+ xor.go\
+
+include $(GOROOT)/src/Make.pkg
package block
import (
- "crypto/block";
"io";
)
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type cbcTest struct {
package block
import (
- "crypto/block";
"io";
)
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type cfbTest struct {
package block
import (
- "crypto/block";
"io";
"os";
)
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"crypto/aes";
- "crypto/block";
"testing";
-
- "./ecb_aes_test";
)
type cmacAESTest struct {
package block
import (
- "crypto/block";
"io";
)
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type ctrTest struct {
for j := 0; j <= 5; j += 5 {
var crypt bytes.Buffer;
in := tt.in[0:len(tt.in) - j];
- w := block.NewCTRWriter(c, tt.iv, &crypt);
+ w := NewCTRWriter(c, tt.iv, &crypt);
var r io.Reader = io.NewByteReader(in);
n, err := io.Copy(r, w);
if n != int64(len(in)) || err != nil {
for j := 0; j <= 7; j += 7 {
var plain bytes.Buffer;
out := tt.out[0:len(tt.out) - j];
- r := block.NewCTRReader(c, tt.iv, io.NewByteReader(out));
+ r := NewCTRReader(c, tt.iv, io.NewByteReader(out));
w := &plain;
n, err := io.Copy(r, w);
if n != int64(len(out)) || err != nil {
package block
import (
- "crypto/block";
"fmt";
"io";
"os";
import (
"bytes";
"crypto/aes";
- "crypto/block";
"fmt";
"io";
"testing";
package block
import (
- "crypto/block";
"io";
"os";
"strconv";
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
import (
"bytes";
- "crypto/block";
"fmt";
"io";
"testing";
package block
import (
- "crypto/block";
"io";
)
package block
-// gotest: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type ofbTest struct {
package block
import (
- "crypto/block";
"io";
"os";
)
import (
"bytes";
- "crypto/block";
"fmt";
"io";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- hmac.$O\
-
-
-phases: a1
-_obj$D/hmac.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/hmac.a hmac.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/hmac.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
-packages: _obj$D/hmac.a
+TARG=crypto/hmac
+GOFILES=\
+ hmac.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/hmac.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
+include $(GOROOT)/src/Make.pkg
import (
"hash";
- "crypto/hmac";
"fmt";
"strings";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- md5.$O\
-
-O2=\
- md5block.$O\
-
-
-phases: a1 a2
-_obj$D/md5.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/md5.a md5.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/md5.a md5block.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/md5.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
-packages: _obj$D/md5.a
+TARG=crypto/md5
+GOFILES=\
+ md5.go\
+ md5block.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/md5.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
+include $(GOROOT)/src/Make.pkg
return Size;
}
-func _Block(dig *digest, p []byte) int
-
func (d *digest) Write(p []byte) (nn int, err os.Error) {
nn = len(p);
d.len += uint64(nn);
import (
"fmt";
- "crypto/md5";
"io";
"testing";
)
package md5
-import "crypto/md5"
-
// table[i] = int((1<<32) * abs(sin(i+1 radians))).
var table = []uint32 {
// round 1
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- sha1.$O\
-
-O2=\
- sha1block.$O\
-
-
-phases: a1 a2
-_obj$D/sha1.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/sha1.a sha1.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/sha1.a sha1block.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/sha1.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
-packages: _obj$D/sha1.a
+TARG=crypto/sha1
+GOFILES=\
+ sha1.go\
+ sha1block.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/sha1.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
+include $(GOROOT)/src/Make.pkg
return Size;
}
-func _Block(dig *digest, p []byte) int
-
func (d *digest) Write(p []byte) (nn int, err os.Error) {
nn = len(p);
d.len += uint64(nn);
import (
"fmt";
- "crypto/sha1";
"io";
"testing";
)
package sha1
-import "crypto/sha1"
-
const (
_K0 = 0x5A827999;
_K1 = 0x6ED9EBA1;
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- datafmt.$O\
-
-O2=\
- parser.$O\
-
-
-phases: a1 a2
-_obj$D/datafmt.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/datafmt.a datafmt.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/datafmt.a parser.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/datafmt.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
-packages: _obj$D/datafmt.a
+TARG=datafmt
+GOFILES=\
+ datafmt.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/datafmt.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
+include $(GOROOT)/src/Make.pkg
import (
"fmt";
- "datafmt";
"os";
"strings";
"testing";
import (
"container/vector";
- "datafmt";
"fmt";
"go/scanner";
"go/token";
}
-func (p *parser) parseExpression() expr
-
func (p *parser) parseOperand() (x expr) {
switch p.tok {
case token.STRING:
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m ebnf.go parser.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ebnf.$O\
-
-O2=\
- parser.$O\
-
-
-phases: a1 a2
-_obj$D/ebnf.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ebnf.a ebnf.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/ebnf.a parser.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ebnf.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
-packages: _obj$D/ebnf.a
+TARG=ebnf
+GOFILES=\
+ ebnf.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ebnf.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
+include $(GOROOT)/src/Make.pkg
package ebnf
import (
- "ebnf";
"io";
"strings";
"testing";
import (
"container/vector";
- "ebnf";
"fmt";
"go/scanner";
"go/token";
}
-func (p *parser) parseExpression() Expression
-
func (p *parser) parseTerm() (x Expression) {
pos := p.pos;
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- exec.$O\
-
-
-phases: a1
-_obj$D/exec.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/exec.a exec.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/exec.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
-packages: _obj$D/exec.a
+TARG=exec
+GOFILES=\
+ exec.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/exec.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
+include $(GOROOT)/src/Make.pkg
package exec
import (
- "exec";
"io";
"testing";
)
func TestRunCat(t *testing.T) {
- cmd, err := exec.Run("/bin/cat", []string{"cat"}, nil,
- exec.Pipe, exec.Pipe, exec.DevNull);
+ cmd, err := Run("/bin/cat", []string{"cat"}, nil,
+ Pipe, Pipe, DevNull);
if err != nil {
t.Fatalf("opencmd /bin/cat: %v", err);
}
func TestRunEcho(t *testing.T) {
cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil,
- exec.DevNull, exec.Pipe, exec.DevNull);
+ DevNull, Pipe, DevNull);
if err != nil {
t.Fatalf("opencmd /bin/echo: %v", err);
}
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- exvar.$O\
-
-
-phases: a1
-_obj$D/exvar.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/exvar.a exvar.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/exvar.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
-packages: _obj$D/exvar.a
+TARG=exvar
+GOFILES=\
+ exvar.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/exvar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
+include $(GOROOT)/src/Make.pkg
package exvar
import (
- "exvar";
"fmt";
"json";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m ast.go filter.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ast.$O\
-
-O2=\
- filter.$O\
-
-
-phases: a1 a2
-_obj$D/ast.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ast.a ast.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/ast.a filter.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ast.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
-packages: _obj$D/ast.a
+TARG=go/ast
+GOFILES=\
+ ast.go\
+ filter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ast.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
+include $(GOROOT)/src/Make.pkg
package ast
import (
- "go/ast";
"go/token";
)
}
-func filterType(typ Expr)
-
func filterFieldList(list []*Field) []*Field {
j := 0;
for _, f := range list {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- comment.$O\
-
-O2=\
- doc.$O\
-
-
-phases: a1 a2
-_obj$D/doc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/doc.a comment.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/doc.a doc.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/doc.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
-packages: _obj$D/doc.a
+TARG=go/doc
+GOFILES=\
+ comment.go\
+ doc.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/doc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
+include $(GOROOT)/src/Make.pkg
"container/vector";
"fmt";
"go/ast";
- "go/doc";
"go/token";
"io";
"regexp";
}
-type PackageDoc struct
-func (doc *docReader) newDoc(pkgname, importpath, filepath string, filenames []string) *PackageDoc
-
func NewFileDoc(file *ast.File) *PackageDoc {
var r docReader;
r.init();
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m parser.go interface.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- parser.$O\
-
-O2=\
- interface.$O\
-
-
-phases: a1 a2
-_obj$D/parser.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/parser.a parser.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/parser.a interface.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/parser.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
-packages: _obj$D/parser.a
+TARG=go/parser
+GOFILES=\
+ interface.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/parser.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
+include $(GOROOT)/src/Make.pkg
"bytes";
"fmt";
"go/ast";
- "go/parser";
"go/scanner";
"io";
"os";
}
-func (p *parser) next()
-
func (p *parser) init(filename string, src []byte, mode uint) {
p.ErrorVector.Init();
p.scanner.Init(filename, src, p, scannerMode(mode));
// ----------------------------------------------------------------------------
// Common productions
-func (p *parser) tryType() ast.Expr
-func (p *parser) parseStringList(x *ast.StringLit) []*ast.StringLit
-func (p *parser) parseExpr() ast.Expr
-func (p *parser) parseStmt() ast.Stmt
-func (p *parser) parseDecl(getSemi bool) (decl ast.Decl, gotSemi bool)
-
-
func (p *parser) parseIdent() *ast.Ident {
if p.tok == token.IDENT {
x := &ast.Ident{p.pos, string(p.lit)};
import (
"go/ast";
- "go/parser";
"os";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- printer.$O\
-
-
-phases: a1
-_obj$D/printer.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/printer.a printer.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/printer.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
-packages: _obj$D/printer.a
+TARG=go/printer
+GOFILES=\
+ printer.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/printer.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
+include $(GOROOT)/src/Make.pkg
}
-func (p *printer) expr(x ast.Expr) bool
-
func (p *printer) identList(list []*ast.Ident) {
for i, x := range list {
if i > 0 {
// ----------------------------------------------------------------------------
// Expressions
-func (p *printer) stmt(s ast.Stmt) (optSemi bool)
-
// Returns true if a separating semicolon is optional.
func (p *printer) expr1(expr ast.Expr, prec1 int) (optSemi bool) {
p.print(expr.Pos());
// ----------------------------------------------------------------------------
// Statements
-func (p *printer) decl(decl ast.Decl) (comment *ast.CommentGroup, optSemi bool)
-
// Print the statement list indented, but without a newline after the last statement.
func (p *printer) stmtList(list []ast.Stmt) {
if len(list) > 0 {
"io";
"go/ast";
"go/parser";
- "go/printer";
"os";
"path";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m scanner.go errors.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- errors.$O\
-
-O2=\
- scanner.$O\
-
-
-phases: a1 a2
-_obj$D/scanner.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/scanner.a errors.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/scanner.a scanner.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/scanner.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
-packages: _obj$D/scanner.a
+TARG=go/scanner
+GOFILES=\
+ errors.go\
+ scanner.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/scanner.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
+include $(GOROOT)/src/Make.pkg
import (
"bytes";
"go/token";
- "go/scanner";
"strconv";
"unicode";
"utf8";
package scanner
import (
- "go/scanner";
"go/token";
"os";
"strings";
// verify scan
index := 0;
epos := token.Position{"", 0, 1, 1};
- nerrors := scanner.Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, scanner.ScanComments,
+ nerrors := Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, ScanComments,
func (pos token.Position, tok token.Token, litb []byte) bool {
e := elt{token.EOF, "", special};
if index < len(tokens) {
}
// verify scan
- var S scanner.Scanner;
+ var S Scanner;
S.Init("TestLineComments", strings.Bytes(src), nil, 0);
for _, s := range segments {
pos, tok, lit := S.Scan();
// Verify that initializing the same scanner more then once works correctly.
func TestInit(t *testing.T) {
- var s scanner.Scanner;
+ var s Scanner;
// 1st init
s.Init("", strings.Bytes("if true { }"), nil, 0);
func TestIllegalChars(t *testing.T) {
- var s scanner.Scanner;
+ var s Scanner;
const src = "*?*$*@*";
- s.Init("", strings.Bytes(src), &TestErrorHandler{t}, scanner.AllowIllegalChars);
+ s.Init("", strings.Bytes(src), &TestErrorHandler{t}, AllowIllegalChars);
for offs, ch := range src {
pos, tok, lit := s.Scan();
if pos.Offset != offs {
"@ @ @" // original file, line 1 again
;
- var s scanner.Scanner;
+ var s Scanner;
v := NewErrorVector();
- nerrors := scanner.Tokenize("File1", strings.Bytes(src), v, 0,
+ nerrors := Tokenize("File1", strings.Bytes(src), v, 0,
func (pos token.Position, tok token.Token, litb []byte) bool {
return tok != token.EOF;
}
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- token.$O\
-
-
-phases: a1
-_obj$D/token.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/token.a token.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/token.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
-packages: _obj$D/token.a
+TARG=go/token
+GOFILES=\
+ token.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/token.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
+include $(GOROOT)/src/Make.pkg
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- hash.$O\
-
-
-phases: a1
-_obj$D/hash.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/hash.a hash.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/hash.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
-packages: _obj$D/hash.a
+TARG=hash
+GOFILES=\
+ hash.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/hash.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
+include $(GOROOT)/src/Make.pkg
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/hash/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- adler32.$O\
-
-
-phases: a1
-_obj$D/adler32.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/adler32.a adler32.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/adler32.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
-packages: _obj$D/adler32.a
+TARG=hash/adler32
+GOFILES=\
+ adler32.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/adler32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
+include $(GOROOT)/src/Make.pkg
package adler32
import (
- "hash/adler32";
"io";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/hash/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- crc32.$O\
-
-
-phases: a1
-_obj$D/crc32.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/crc32.a crc32.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/crc32.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
-packages: _obj$D/crc32.a
+TARG=hash/crc32
+GOFILES=\
+ crc32.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/crc32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
+include $(GOROOT)/src/Make.pkg
package crc32
import (
- "hash/crc32";
"io";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- status.$O\
- url.$O\
-
-O2=\
- request.$O\
-
-O3=\
- client.$O\
- server.$O\
-
-O4=\
- fs.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/http.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/http.a status.$O url.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/http.a request.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/http.a client.$O server.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/http.a fs.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/http.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
-packages: _obj$D/http.a
+TARG=http
+GOFILES=\
+ client.go\
+ fs.go\
+ request.go\
+ server.go\
+ status.go\
+ url.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/http.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
+include $(GOROOT)/src/Make.pkg
import (
"bufio";
"fmt";
- "http";
"io";
"log";
"net";
import (
"fmt";
- "http";
"io";
"strings";
"testing";
import (
"fmt";
- "http";
"io";
"os";
"path";
"bytes";
"container/vector";
"fmt";
- "http";
"io";
"os";
"strconv";
import (
"fmt";
- "http";
"os";
"testing";
)
import (
"bufio";
"fmt";
- "http";
"io";
"log";
"net";
return c, nil
}
-func (c *Conn) SetHeader(hdr, val string)
-
// Read next request from connection.
func (c *Conn) readRequest() (req *Request, err os.Error) {
if c.hijacked {
// package main
//
// import (
-// "http";
// "io";
// )
//
"exvar";
"flag";
"fmt";
- "http";
"io";
"log";
"net";
import (
"fmt";
- "http";
"os";
"reflect";
"testing";
// TODO(rsc):
// test URLUnescape
-// test URLEscape
+// test URLEscape
// test ParseURL
type URLTest struct {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- parse.$O\
-
-O2=\
- generic.$O\
- struct.$O\
-
-
-phases: a1 a2
-_obj$D/json.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/json.a parse.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/json.a generic.$O struct.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/json.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
-packages: _obj$D/json.a
+TARG=json
+GOFILES=\
+ generic.go\
+ parse.go\
+ struct.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/json.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
+include $(GOROOT)/src/Make.pkg
import (
"container/vector";
"fmt";
- "json";
"math";
"strconv";
"strings";
package json
import (
- "json";
"testing";
)
package json
import (
- "json";
"reflect";
"strings";
)
package json
import (
- "json";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- log.$O\
-
-
-phases: a1
-_obj$D/log.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/log.a log.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/log.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/log.a
-packages: _obj$D/log.a
+TARG=log
+GOFILES=\
+ log.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/log.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/log.a
+include $(GOROOT)/src/Make.pkg
import (
"bufio";
- "log";
"os";
"regexp";
"testing";
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- malloc.$O\
-
-
-phases: a1
-_obj$D/malloc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/malloc.a malloc.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/malloc.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/malloc.a
-packages: _obj$D/malloc.a
+TARG=malloc
+GOFILES=\
+ malloc.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/malloc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/malloc.a
+include $(GOROOT)/src/Make.pkg
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m dnsclient.go dnsconfig.go dnsmsg.go fd.go fd_${GOOS}.go ip.go net.go parse.go port.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- fd_$(GOOS).$O\
- parse.$O\
-
-O2=\
- fd.$O\
- ip.$O\
-
-O3=\
- dnsconfig.$O\
- dnsmsg.$O\
- net.$O\
-
-O4=\
- dnsclient.$O\
- port.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/net.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/net.a fd_$(GOOS).$O parse.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/net.a fd.$O ip.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/net.a dnsconfig.$O dnsmsg.$O net.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/net.a dnsclient.$O port.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/net.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/net.a
-
-packages: _obj$D/net.a
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/net.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/net.a
+TARG=net
+GOFILES=\
+ dnsclient.go\
+ dnsconfig.go\
+ dnsmsg.go\
+ fd.go\
+ fd_$(GOOS).go\
+ ip.go\
+ net.go\
+ parse.go\
+ port.go\
+
+include $(GOROOT)/src/Make.pkg
import (
"flag";
"io";
- "net";
"os";
"strings";
"syscall";
// fd is already connected to the destination, port 80.
// Run an HTTP request to fetch the appropriate page.
-func fetchGoogle(t *testing.T, fd net.Conn, network, addr string) {
+func fetchGoogle(t *testing.T, fd Conn, network, addr string) {
req := strings.Bytes("GET /intl/en/privacy.html HTTP/1.0\r\nHost: www.google.com\r\n\r\n");
n, err := fd.Write(req);
}
func doDial(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
if err != nil {
- t.Errorf("net.Dial(%q, %q, %q) = _, %v", network, "", addr, err);
+ t.Errorf("Dial(%q, %q, %q) = _, %v", network, "", addr, err);
return
}
fetchGoogle(t, fd, network, addr);
}
func doDialTCP(t *testing.T, network, addr string) {
- fd, err := net.DialTCP(network, "", addr);
+ fd, err := DialTCP(network, "", addr);
if err != nil {
- t.Errorf("net.DialTCP(%q, %q, %q) = _, %v", network, "", addr, err);
+ t.Errorf("DialTCP(%q, %q, %q) = _, %v", network, "", addr, err);
} else {
fetchGoogle(t, fd, network, addr);
}
import (
"io";
- "net";
"once";
"os";
"strings";
import (
"io";
- "net";
"os";
"strconv";
)
import (
"fmt";
- "net";
"os";
"reflect";
)
package net
import (
- "net";
"once";
"os";
"sync";
poll *pollster; // low-level OS hooks
deadline int64; // next deadline (nsec since 1970)
}
-func (s *pollServer) Run();
func newPollServer() (s *pollServer, err os.Error) {
s = new(pollServer);
return e == os.EAGAIN;
}
-func sockaddrToString(sa syscall.Sockaddr) (name string, err os.Error)
-
func (fd *netFD) addr() string {
sa, e := syscall.Getsockname(fd.fd);
if e != 0 {
package net
import (
- "net";
"os";
"syscall";
)
package net
import (
- "net";
"os";
"syscall";
)
package net
import (
- "net"
)
// IP address lengths (bytes).
package net
import (
- "net";
"testing"
)
package net
import (
- "net";
"os";
"reflect";
"strconv";
return syscall.SOMAXCONN
}
-func LookupHost(name string) (cname string, addrs []string, err os.Error)
-func LookupPort(network, service string) (port int, err os.Error)
-
// Split "host:port" into "host" and "port".
// Host cannot contain colons unless it is bracketed.
func splitHostPort(hostport string) (host, port string, err os.Error) {
package net
import (
- "net";
"os";
"regexp";
"testing";
func TestDialError(t *testing.T) {
for i, tt := range dialErrorTests {
- c, e := net.Dial(tt.Net, tt.Laddr, tt.Raddr);
+ c, e := Dial(tt.Net, tt.Laddr, tt.Raddr);
if c != nil {
c.Close();
}
import (
"bufio";
- "net";
"os";
"testing";
)
import (
"io";
- "net";
"once";
"os";
)
package net
import (
- "net";
"testing";
)
import (
"io";
- "net";
"os";
"strings";
"syscall";
}
func runServe(t *testing.T, network, addr string, listening chan<- string, done chan<- int) {
- l, err := net.Listen(network, addr);
+ l, err := Listen(network, addr);
if err != nil {
t.Fatalf("net.Listen(%q, %q) = _, %v", network, addr, err);
}
}
func connect(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
if err != nil {
t.Fatalf("net.Dial(%q, %q, %q) = _, %v", network, "", addr, err);
}
package net
import (
- "net";
"os";
"testing";
"time";
)
func testTimeout(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
defer fd.Close();
if err != nil {
t.Errorf("dial %s %s failed: %v", network, addr, err);
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- path.$O\
-
-
-phases: a1
-_obj$D/path.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/path.a path.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/path.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/path.a
-packages: _obj$D/path.a
+TARG=path
+GOFILES=\
+ path.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/path.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/path.a
+include $(GOROOT)/src/Make.pkg
package path
import (
- "path";
"testing"
)
var exttests = []ExtTest {
ExtTest{"path.go", ".go"},
ExtTest{"path.pb.go", ".go"},
- ExtTest{"path", ""},
ExtTest{"a.dir/b", ""},
ExtTest{"a.dir/b.go", ".go"},
ExtTest{"a.dir/", ""},
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- rand.$O\
-
-
-phases: a1
-_obj$D/rand.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/rand.a rand.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/rand.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rand.a
-packages: _obj$D/rand.a
+TARG=rand
+GOFILES=\
+ rand.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/rand.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rand.a
+include $(GOROOT)/src/Make.pkg
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- regexp.$O\
-
-
-phases: a1
-_obj$D/regexp.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/regexp.a regexp.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/regexp.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/regexp.a
-packages: _obj$D/regexp.a
+TARG=regexp
+GOFILES=\
+ regexp.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/regexp.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/regexp.a
+include $(GOROOT)/src/Make.pkg
import (
"os";
- "regexp";
"strings";
"testing";
)
return p;
}
-func (p *parser) regexp() (start, end instr)
-
var iNULL instr
func special(c int) bool {
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- server.$O\
-
-O2=\
- client.$O\
- debug.$O\
-
-
-phases: a1 a2
-_obj$D/rpc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/rpc.a server.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/rpc.a client.$O debug.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/rpc.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rpc.a
-packages: _obj$D/rpc.a
+TARG=rpc
+GOFILES=\
+ client.go\
+ debug.go\
+ server.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/rpc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rpc.a
+include $(GOROOT)/src/Make.pkg
"log";
"net";
"os";
- "rpc";
"strconv";
"sync";
)
"io";
"log";
"os";
- "rpc";
"sort";
"template";
)
server.input(conn);
}
-func debugHTTP(c *http.Conn, req *http.Request)
-
// HandleHTTP registers an HTTP handler for RPC messages.
// It is still necessary to invoke http.Serve(), typically in a go statement.
func HandleHTTP() {
"net";
"once";
"os";
- "rpc";
"strings";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- sort.$O\
-
-
-phases: a1
-_obj$D/sort.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/sort.a sort.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/sort.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sort.a
-packages: _obj$D/sort.a
+TARG=sort
+GOFILES=\
+ sort.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/sort.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sort.a
+include $(GOROOT)/src/Make.pkg
import (
"fmt";
"rand";
- "sort";
"testing";
)
func TestSortIntArray(t *testing.T) {
data := ints;
a := IntArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", ints);
t.Errorf(" got %v", data);
}
func TestSortFloatArray(t *testing.T) {
data := floats;
a := FloatArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", floats);
t.Errorf(" got %v", data);
}
func TestSortStringArray(t *testing.T) {
data := strings;
a := StringArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", strings);
t.Errorf(" got %v", data);
}
func TestSortInts(t *testing.T) {
data := ints;
- sort.SortInts(&data);
- if !sort.IntsAreSorted(&data) {
+ SortInts(&data);
+ if !IntsAreSorted(&data) {
t.Errorf("sorted %v", ints);
t.Errorf(" got %v", data);
}
func TestSortFloats(t *testing.T) {
data := floats;
- sort.SortFloats(&data);
- if !sort.FloatsAreSorted(&data) {
+ SortFloats(&data);
+ if !FloatsAreSorted(&data) {
t.Errorf("sorted %v", floats);
t.Errorf(" got %v", data);
}
func TestSortStrings(t *testing.T) {
data := strings;
- sort.SortStrings(&data);
- if !sort.StringsAreSorted(&data) {
+ SortStrings(&data);
+ if !StringsAreSorted(&data) {
t.Errorf("sorted %v", strings);
t.Errorf(" got %v", data);
}
for i := 0; i < len(data); i++ {
data[i] = rand.Intn(100);
}
- if sort.IntsAreSorted(data) {
+ if IntsAreSorted(data) {
t.Fatalf("terrible rand.rand");
}
- sort.SortInts(data);
- if !sort.IntsAreSorted(data) {
+ SortInts(data);
+ if !IntsAreSorted(data) {
t.Errorf("sort didn't sort - 1M ints");
}
}
for i := 0; i < n; i++ {
mdata[i] = data[i];
}
- // sort.SortInts is known to be correct
+ // SortInts is known to be correct
// because mode Sort runs after mode _Copy.
- sort.SortInts(mdata);
+ SortInts(mdata);
case _Dither:
for i := 0; i < n; i++ {
mdata[i] = data[i] + i%5;
desc := fmt.Sprintf("n=%d m=%d dist=%s mode=%s", n, m, dists[dist], modes[mode]);
d := &testingData{desc, t, mdata[0:n], n*lg(n)*12/10, 0};
- sort.Sort(d);
+ Sort(d);
// If we were testing C qsort, we'd have to make a copy
// of the array and sort it ourselves and then compare
// the data, not (for example) overwriting it with zeros.
//
// In go, we don't have to be so paranoid: since the only
- // mutating method sort.Sort can call is TestingData.swap,
+ // mutating method Sort can call is TestingData.swap,
// it suffices here just to check that the final array is sorted.
- if !sort.IntsAreSorted(mdata) {
+ if !IntsAreSorted(mdata) {
t.Errorf("%s: ints not sorted", desc);
t.Errorf("\t%v", mdata);
t.FailNow();
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- strings.$O\
-
-
-phases: a1
-_obj$D/strings.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/strings.a strings.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/strings.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/strings.a
-packages: _obj$D/strings.a
+TARG=strings
+GOFILES=\
+ strings.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/strings.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/strings.a
+include $(GOROOT)/src/Make.pkg
package strings
import (
- "strings";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m asm_${GOOS}_${GOARCH}.s errstr.go exec.go syscall.go syscall_${GOOS}.go syscall_${GOOS}_${GOARCH}.go zerrors_${GOOS}_${GOARCH}.go zsyscall_${GOOS}_${GOARCH}.go zsysnum_${GOOS}_${GOARCH}.go ztypes_${GOOS}_${GOARCH}.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
+TARG=syscall
+GOFILES=\
+ errstr.go\
+ exec.go\
+ syscall.go\
+ syscall_$(GOOS).go\
+ syscall_$(GOOS)_$(GOARCH).go\
+ zerrors_$(GOOS)_$(GOARCH).go\
+ zsyscall_$(GOOS)_$(GOARCH).go\
+ zsysnum_$(GOOS)_$(GOARCH).go\
+ ztypes_$(GOOS)_$(GOARCH).go\
+
+OFILES=\
asm_$(GOOS)_$(GOARCH).$O\
- syscall.$O\
- zerrors_$(GOOS)_$(GOARCH).$O\
- zsysnum_$(GOOS)_$(GOARCH).$O\
- ztypes_$(GOOS)_$(GOARCH).$O\
-
-O2=\
- errstr.$O\
- zsyscall_$(GOOS)_$(GOARCH).$O\
-
-O3=\
- syscall_$(GOOS)_$(GOARCH).$O\
-
-O4=\
- syscall_$(GOOS).$O\
-
-O5=\
- exec.$O\
-
-
-phases: a1 a2 a3 a4 a5
-_obj$D/syscall.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/syscall.a asm_$(GOOS)_$(GOARCH).$O syscall.$O zerrors_$(GOOS)_$(GOARCH).$O zsysnum_$(GOOS)_$(GOARCH).$O ztypes_$(GOOS)_$(GOARCH).$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/syscall.a errstr.$O zsyscall_$(GOOS)_$(GOARCH).$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/syscall.a syscall_$(GOOS)_$(GOARCH).$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/syscall.a syscall_$(GOOS).$O
- rm -f $(O4)
-
-a5: $(O5)
- $(AR) grc _obj$D/syscall.a exec.$O
- rm -f $(O5)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/syscall.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-$(O6): a5
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/syscall.a
-
-packages: _obj$D/syscall.a
+ types_$(GOOS)_$(GOARCH).$O\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/syscall.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/syscall.a
+include $(GOROOT)/src/Make.pkg
package syscall
-import "syscall"
func str(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
import (
"sync";
- "syscall";
"unsafe";
)
// the manuals for the appropriate operating system.
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
const OS = "darwin"
package syscall
-import "syscall"
-
func Getpagesize() int {
return 4096
}
package syscall
-import "syscall"
-
func Getpagesize() int {
return 4096
}
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
const OS = "linux"
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func Getpagesize() int {
return 4096
package syscall
-import "syscall"
-
//sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int)
//sys Fstat(fd int, stat *Stat_t) (errno int)
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- tabwriter.$O\
-
-
-phases: a1
-_obj$D/tabwriter.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/tabwriter.a tabwriter.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/tabwriter.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tabwriter.a
-packages: _obj$D/tabwriter.a
+TARG=tabwriter
+GOFILES=\
+ tabwriter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/tabwriter.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tabwriter.a
+include $(GOROOT)/src/Make.pkg
import (
"io";
"os";
- "tabwriter";
"testing";
)
}
-func write(t *testing.T, testname string, w *tabwriter.Writer, src string) {
+func write(t *testing.T, testname string, w *Writer, src string) {
written, err := io.WriteString(w, src);
if err != nil {
t.Errorf("--- test: %s\n--- src:\n%s\n--- write error: %v\n", testname, src, err);
}
-func verify(t *testing.T, testname string, w *tabwriter.Writer, b *buffer, src, expected string) {
+func verify(t *testing.T, testname string, w *Writer, b *buffer, src, expected string) {
err := w.Flush();
if err != nil {
t.Errorf("--- test: %s\n--- src:\n%s\n--- flush error: %v\n", testname, src, err);
var b buffer;
b.init(1000);
- var w tabwriter.Writer;
+ var w Writer;
w.Init(&b, tabwidth, padding, padchar, flags);
// write all at once
entry{
"4b",
- 8, 1, '.', tabwriter.AlignRight,
+ 8, 1, '.', AlignRight,
"\t", // '\t' terminates an empty cell on last line - nothing to print
""
},
entry{
"5d",
- 8, 1, '.', tabwriter.AlignRight,
+ 8, 1, '.', AlignRight,
"*\t*\t",
".......**"
},
entry{
"7f",
- 8, 1, '.', tabwriter.FilterHTML,
+ 8, 1, '.', FilterHTML,
"f) f<o\t<b>bar</b>\t\n",
"f) f<o..<b>bar</b>.....\n"
},
entry{
"7g",
- 8, 1, '.', tabwriter.FilterHTML,
+ 8, 1, '.', FilterHTML,
"g) f<o\t<b>bar</b>\t non-terminated entity &",
"g) f<o..<b>bar</b>..... non-terminated entity &"
},
entry{
"9b",
- 0, 0, '.', tabwriter.FilterHTML,
+ 0, 0, '.', FilterHTML,
"1\t2<!---\f--->\t3\t4\n" // \f inside HTML is ignored
"11\t222\t3333\t44444\n",
entry{
"12a",
- 8, 1, ' ', tabwriter.AlignRight,
+ 8, 1, ' ', AlignRight,
"a\tè\tc\t\n"
"aa\tèèè\tcccc\tddddd\t\n"
"aaa\tèèèè\t\n",
entry{
"13c",
- 8, 1, '\t', tabwriter.FilterHTML,
+ 8, 1, '\t', FilterHTML,
"4444\t333\t22\t1\t333\n"
"999999999\t22\n"
"7\t22\n"
entry{
"14",
- 0, 2, ' ', tabwriter.AlignRight,
+ 0, 2, ' ', AlignRight,
".0\t.3\t2.4\t-5.1\t\n"
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- format.$O\
-
-O2=\
- template.$O\
-
-
-phases: a1 a2
-_obj$D/template.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/template.a format.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/template.a template.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/template.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/template.a
-packages: _obj$D/template.a
+TARG=template
+GOFILES=\
+ format.go\
+ template.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/template.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/template.a
+include $(GOROOT)/src/Make.pkg
"reflect";
"runtime";
"strings";
- "template";
)
// Errors returned during parsing and execution. Users may extract the information and reformat
return false, tok, w
}
-// parseSection and parseRepeated are mutually recursive
-func (t *Template) parseSection(words []string) *sectionElement
+// parseRepeated and parseSection are mutually recursive
func (t *Template) parseRepeated(words []string) *repeatedElement {
r := new(repeatedElement);
t.execError(st, v.linenum, "missing formatter %s for variable %s", v.formatter, v.name)
}
-// execute{|Element|Section|Repeated} are mutually recursive
-func (t *Template) executeSection(s *sectionElement, st *state)
-func (t *Template) executeRepeated(r *repeatedElement, st *state)
-
// Execute element i. Return next index to execute.
func (t *Template) executeElement(i int, st *state) int {
switch elem := t.elems.At(i).(type) {
"io";
"os";
"reflect";
- "template";
"testing";
)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- regexp.$O\
-
-O2=\
- testing.$O\
-
-
-phases: a1 a2
-_obj$D/testing.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/testing.a regexp.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/testing.a testing.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/testing.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/testing.a
-packages: _obj$D/testing.a
+TARG=testing
+GOFILES=\
+ regexp.go\
+ testing.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/testing.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/testing.a
+include $(GOROOT)/src/Make.pkg
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/testing/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- logger.$O\
- reader.$O\
-
-
-phases: a1
-_obj$D/iotest.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/iotest.a logger.$O reader.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/iotest.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/iotest.a
-packages: _obj$D/iotest.a
+TARG=testing/iotest
+GOFILES=\
+ logger.go\
+ reader.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/iotest.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/iotest.a
+include $(GOROOT)/src/Make.pkg
return p;
}
-func (p *parser) regexp() (start, end instr)
-
var iNULL instr
func special(c int) bool {
"fmt";
"os";
"runtime";
- "testing";
)
// Report as tests are run; default is silent for success.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- letter.$O\
-
-O2=\
- decimaldigit.$O\
-
-
-phases: a1 a2
-_obj$D/unicode.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/unicode.a letter.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/unicode.a decimaldigit.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/unicode.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/unicode.a
-packages: _obj$D/unicode.a
+TARG=unicode
+GOFILES=\
+ decimaldigit.go\
+ letter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/unicode.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/unicode.a
+include $(GOROOT)/src/Make.pkg
// These ranges are the characters with the third field "Nd".
// Should generate automatically etc.
-import "unicode"
-
// Decimal digit is the set of Unicode characters with the "decimal digit" property.
var DecimalDigit = []Range{
Range{0x0030, 0x0039, 1},
package unicode
-import (
- "testing";
- "unicode";
-)
+import "testing"
// To get data:
// grep '^....;[^;]*;Nd;' UnicodeData.txt
package unicode
-import (
- "testing";
- "unicode";
-)
+import "testing"
var upper = []int{
0x41,