code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* this table might overflow 127-bit exponent representations.
* in that case, truncate it after 1.0e38.
* it is important to get all one can... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
func Sqrt(x float64) float64
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* asin(arg) and acos(arg) return the arcsin, arccos,
* respectively of their arguments.
*
* Arctan is called after appropriate range reduc... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
func sinus(x float64, quad int) float64 {
// Coefficients are #3370 from Hart & Cheney (18.80D).
const (
P0 = .1357884097877375669092680e8;
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* Sinh(x) returns the hyperbolic sine of x
*
* The exponential func is called for arguments
* greater in magnitude than 0.5.
*
* A serie... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* floating-point mod func without infinity or NaN checking
*/
// Fmod returns the floating-point remainder of x/y.
func Fmod(x, y float64) ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
// Pow returns x**y, the base-x exponential of y.
func Pow(x, y float64) float64 {
// TODO: x or y NaN, ±Inf, maybe ±0.
switch {
case y == 0:
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
// Atan returns the arc tangent of y/x, using
// the signs of the two to determine the quadrant
// of the return value.
func Atan2(x, y float64) ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* sqrt returns the square root of its floating
* point argument. Newton's method.
*
* calls frexp
*/
// Sqrt returns the square root of ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* floating point tangent
*/
// Tan returns the tangent of x.
func Tan(x float64) float64 {
// Coefficients are #4285 from Hart & Cheney. (... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
/*
* tanh(x) computes the hyperbolic tangent of its floating
* point argument.
*
* sinh and cosh are called except for large arguments, which... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package math
import "unsafe"
// Float32bits returns the IEEE 754 binary representation of f.
func Float32bits(f float32) uint32 { return *(*uint32)(unsafe.Poi... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The exec package runs external commands.
package exec
import (
"os";
"strings";
)
// Arguments to Run.
const (
DevNull = iota;
PassThrough;
Pipe;
Mer... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Marshalling and unmarshalling of
// JSON data into Go structs using reflection.
package json
import (
"reflect";
"strings";
)
type structBuilder struct ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// JSON (JavaScript Object Notation) parser.
// See http://www.json.org/
// The json package implements a simple parser and
// representation for JSON (JavaScr... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Generic representation of JSON objects.
package json
import (
"container/vector";
"fmt";
"math";
"strconv";
"strings";
)
// Integers identifying the ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The gzip package implements reading (and eventually writing) of
// gzip format compressed files, as specified in RFC 1952.
package gzip
import (
"bufio";
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
import (
"io";
"math";
"os";
"strconv";
)
const (
// The largest offset code.
offsetCodeCount = 30;
// The largest offset code in the ex... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
import (
"math";
"sort";
)
type huffmanEncoder struct {
codeBits []uint8;
code []uint16;
}
type literalNode struct {
literal uint16;
fre... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
func min(left int, right int) int {
if left < right {
return left
}
return right;
}
func minInt32(left int32, right int32) int32 {
if left... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
import (
"bytes";
"io";
"math";
"os";
)
const (
NoCompression = 0;
BestSpeed = 1;
fastCompression = 3;
BestCompression = 9;
Default... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The flate package implements the DEFLATE compressed data
// format, described in RFC 1951. The gzip and zlib packages
// implement access to DEFLATE-based f... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
const (
// 2 bits: type 0 = literal 1=EOF 2=Match 3=Unused
// 8 bits: xlength = length - MIN_MATCH_LENGTH
// 22 bits xoffset = off... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package flate
var reverseByte = [256]byte{
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48,... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package zlib
import (
"compress/flate";
"hash";
"hash/adler32";
"io";
"os";
)
// These constants are copied from the flate package, so that code that imp... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The zlib package implements reading and writing of zlib
// format compressed files, as specified in RFC 1950.
package zlib
import (
"bufio";
"compress/fla... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gob
import (
"bytes";
"io";
"math";
"os";
"reflect";
"unsafe";
)
const uint64Size = unsafe.Sizeof(uint64(0))
// The global execution state of a... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gob
import (
"bytes";
"io";
"os";
"sync";
)
// A Decoder manages the receipt of type and data information read from the
// remote side of a connec... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The gob package manages streams of gobs - binary values exchanged between an
Encoder (transmitter) and a Decoder (receiver). A typical use is transporting... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gob
import (
"fmt";
"os";
"reflect";
"sync";
)
type kind reflect.Type
// Reflection types are themselves interface values holding structs
// desc... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gob
// TODO(rsc): When garbage collector changes, revisit
// the allocations in this file that use unsafe.Pointer.
import (
"bytes";
"io";
"math";
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Rational numbers
package bignum
import "fmt"
// Rational represents a quotient a/b of arbitrary precision.
//
type Rational struct {
a *Integer; // nume... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Integer numbers
//
// Integers are normalized if the mantissa is normalized and the sign is
// false for mant == 0. Use MakeInt to create normalized Integers... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// A package for arbitrary precision arithmethic.
// It implements the following numeric types:
//
// - Natural unsigned integers
// - Integer signed integers
/... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Fast versions of the routines in this file are in fast.arith.s.
// Simply replace this file with arith.s (renamed from fast.arith.s)
// and the bignum packag... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package draw provides basic graphics and drawing primitives,
// in the style of the Plan 9 graphics library
// (see http://plan9.bell-labs.com/magic/man2htm... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package draw
import "image"
// A Color represents a color with 8-bit R, G, B, and A values,
// packed into a uint32—0xRRGGBBAA—so that comparison
// is defin... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package draw
// A Point is an X, Y coordinate pair.
type Point struct {
X, Y int;
}
// ZP is the zero Point.
var ZP Point
// A Rectangle contains the Point... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package draw
// A Context represents a single graphics window.
type Context interface {
// Screen returns an editable Image of window.
Screen() Image;
// ... | Go |
// games/4s - a tetris clone
//
// Derived from Plan 9's /sys/src/games/xs.c
// http://plan9.bell-labs.com/sources/plan9/sys/src/games/xs.c
//
// Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved.
// Portions Copyright 2009 The Go Authors. All Rights Reserved.
// Distributed under the terms ... | Go |
// games/4s - a tetris clone
//
// Derived from Plan 9's /sys/src/games/xs.c
// http://plan9.bell-labs.com/sources/plan9/sys/src/games/xs.c
//
// Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved.
// Portions Copyright 2009 The Go Authors. All Rights Reserved.
// Distributed under the terms ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This is a simple demo of Go running under Native Client.
// It is a tetris clone built on top of the exp/nacl/av and exp/draw
// packages.
package main
imp... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* The datafmt package implements syntax-directed, type-driven formatting
of arbitrary data structures. Formatting a data structure consists of
two phases: fi... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package datafmt
import (
"container/vector";
"go/scanner";
"go/token";
"os";
"strconv";
"strings";
)
// ------------------------------------------------... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// SRPC constants, data structures, and parsing.
package srpc
import (
"bytes";
"math";
"os";
"strconv";
"syscall";
"unsafe";
)
// An Errno is an SRPC... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// SRPC server
package srpc
import (
"bytes";
"log";
"os";
"syscall";
)
// TODO(rsc): I'd prefer to make this
// type Handler func(m *msg) Errno
// but ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package implements Native Client's simple RPC (SRPC).
package srpc
import (
"bytes";
"log";
"os";
"sync";
)
// A Client represents the client sid... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Native Client audio/video
// Package av implements audio and video access for Native Client
// binaries running standalone or embedded in a web browser win... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package av
import (
"image";
)
// Native Client image format:
// a single linear array of 32-bit ARGB as packed uint32s.
// An Image represents a Native Cl... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// NaCl GUI events.
// Clients do not have raw access to the event stream
// (only filtered through the lens of package draw)
// but perhaps they will.
packag... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"./_obj/eval";
"bufio";
"flag";
"go/parser";
"go/scanner";
"io";
"os";
)
var filename = flag.String("f", "", "file to run")
fun... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"fmt";
"go/scanner";
"go/token";
)
type positioned interface {
Pos() token.Position;
}
// A compiler captures information used t... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"log";
"go/token";
"reflect";
)
/*
* Type bridging
*/
var (
evalTypes = make(map[reflect.Type]Type);
nativeTypes = make(map[Typ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"bignum";
)
// TODO(austin): Maybe add to bignum in more general form
func ratToString(rat *bignum.Rational) string {
n, dnat := rat.... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"fmt";
"os";
"runtime";
)
// Abort aborts the thread's current computation,
// causing the innermost Try to return err.
func (t *Thr... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
// generate operator implementations
import (
"log";
"os";
"template";
)
type Op struct {
Name string;
Expr string;
Body string; // ov... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"bignum";
"go/ast";
"go/token";
"log";
"strconv";
"strings";
"os";
)
// An expr is the result of compiling an expression. It st... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"bignum";
"fmt";
)
type Value interface {
String() string;
// Assign copies another value into this one. It should
// assume that... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"go/token";
"log";
)
/*
* Blocks and scopes
*/
// A definition can be a *Variable, *Constant, or Type.
type Def interface {
Pos()... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"bignum";
"log";
"go/ast";
"go/token";
)
const (
returnPC = ^uint(0);
badPC = ^uint(1);
)
/*
* Statement compiler
*/
type st... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"bignum";
"go/ast";
"go/token";
"log";
"reflect";
"sort";
"unsafe"; // For Sizeof
)
// XXX(Spec) The type compatibility section... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import "os"
/*
* Virtual machine
*/
type Thread struct {
abort chan os.Error;
pc uint;
// The execution frame of this function. This rema... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package eval
import (
"go/ast";
"go/token";
"log";
)
/*
* Type compiler
*/
type typeCompiler struct {
*compiler;
block *block;
// Check to be perfo... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package is the beginning of an interpreter for Go.
// It can run simple Go programs but does not implement
// interface values or packages.
package eva... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The iterable package provides several traversal and searching methods.
// It can be used on anything that satisfies the Iterable interface,
// including vect... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "exp/ogle"
func main() { ogle.Main() }
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"exp/eval";
"reflect";
)
// This file contains remote runtime definitions. Using reflection,
// we convert all of the... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/elf";
"debug/gosym";
"debug/proc";
"exp/eval";
"fmt";
"log";
"os";
"reflect";
)
// A FormatError indicates a failure to ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"exp/eval";
"fmt";
"log";
)
const debugParseRemoteType = false
// A remoteType is the local representation of a type... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"exp/eval";
"fmt";
"os";
)
// A Goroutine represents a goroutine in a remote process.
type Goroutine struct {
g remo... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"math";
)
type Arch interface {
// ToWord converts an array of up to 8 bytes in memory order
// to a word.
ToWord(da... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"exp/eval";
"fmt";
)
// A RemoteMismatchError occurs when an operation that requires two
// identical remote processes... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"os";
"runtime";
)
// An aborter aborts the thread's current computation, usually
// passing the error to a waiting thread.
type abor... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/gosym";
"debug/proc";
"exp/eval";
"log";
"os";
)
/*
* Remote frame pointers
*/
// A NotOnStack error occurs when attempt... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/gosym";
"debug/proc";
"fmt";
"os";
)
// A Frame represents a single frame on a remote call stack.
type Frame struct {
// pc... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Ogle is the beginning of a debugger for Go.
package ogle
import (
"bufio";
"debug/elf";
"debug/proc";
"exp/eval";
"fmt";
"go/scanner";
"go/token";
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogle
import (
"debug/proc";
"fmt";
"os";
)
/*
* Hooks and events
*/
// An EventHandler is a function that takes an event and returns a
// respo... | Go |
// Copyright (c) 1996 Barry Silverman, Brian Silverman, Vadim Gerasimov.
// Portions Copyright (c) 2009 The Go Authors.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restricti... | Go |
// Copyright (c) 1996 Barry Silverman, Brian Silverman, Vadim Gerasimov.
// Portions Copyright (c) 2009 The Go Authors.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restricti... | Go |
// This file contains the assembly language and machine code for
// Spacewar!, the original PDP-1 video game. It is downloaded from
// http://spacewar.oversigma.com/sources/sources.zip which has
// the following notice at http://spacewar.oversigma.com/:
//
// Spacewar! was conceived in 1961 by Martin Graetz, Stephen R... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package provides a single function, Do, to run a function
// exactly once, usually used as part of initialization.
package once
import "sync"
type job... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The list package implements a doubly linked list.
package list
// Element is an element in the linked list.
type Element struct {
// Next and previous poin... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The vector package implements an efficient container for managing
// linear arrays of elements. Unlike arrays, vectors can change size dynamically.
package ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package vector
// StringVector is a specialization of Vector that hides the wrapping of Elements around strings.
type StringVector struct {
Vector;
}
// Ini... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package vector
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
type IntVector struct {
Vector;
}
// Init initia... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package provides heap operations for any type that implements
// heap.Interface.
//
package heap
import "sort"
// Any type that implements heap.Interf... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The ring package implements operations on circular lists.
package ring
// A Ring is an element of a circular list, or ring.
// Rings do not have a beginning... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Template library: default formatters
package template
import (
"bytes";
"fmt";
"io";
"strings";
)
// StringFormatter formats into the default string r... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Data-driven templates for generating textual output such as
HTML. See
http://code.google.com/p/json-template/wiki/Reference
for full documentation of th... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package implements translation between
// unsigned integer values and byte sequences.
package binary
import (
"math";
"io";
"os";
"reflect";
)
//... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ascii85 implements the ascii85 data encoding
// as used in the btoa tool and Adobe's PostScript and PDF document formats.
package ascii85
import (
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package implements hexadecimal encoding and decoding.
package hex
import (
"os";
"strconv";
"strings";
)
const hextable = "0123456789abcdef"
// En... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package implements the PEM data encoding, which originated in Privacy
// Enhanced Mail. The most common use of PEM encoding today is in TLS keys and
// ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package git85 implements the radix 85 data encoding
// used in the Git version control system.
package git85
import (
"bytes";
"io";
"os";
"strconv";
)... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package base64 implements base64 encoding as specified by RFC 4648.
package base64
import (
"bytes";
"io";
"os";
"strconv";
)
/*
* Encodings
*/
// A... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package fmt implements formatted I/O with functions analogous
to C's printf. The format 'verbs' are derived from C's but
are simpler.
The verbs:
Gene... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fmt
import (
"strconv";
)
const nByte = 64
const nPows10 = 160
var ldigits string = "0123456789abcdef" // var not const because we take its address... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The testing package implements a simple regular expression library.
// It is a reduced version of the regular expression package suitable
// for use in tests... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package aids in the testing of code that uses channels.
package script
import (
"fmt";
"os";
"rand";
"reflect";
"strings";
)
// An Event is an el... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This package implements utility functions to help with black box testing.
package quick
import (
"flag";
"fmt";
"math";
"os";
"rand";
"reflect";
"str... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.