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. // +build ignore /* Input to cgo. GOARCH=amd64 cgo -cdefs defs_darwin.go >defs_darwin_amd64.h GOARCH=386 cgo -cdefs defs_darwin.go >defs_darwin_386.h */ pack...
Go
// Copyright 2010 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 cgo contains runtime support for code generated by the cgo tool. See the documentation for the cgo command for details on using cgo. */ package cgo...
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. // Repeated malloc test. // +build ignore package main import ( "flag" "runtime" ) var chatty = flag.Bool("v", false, "chatty") var oldsys uint64 var mem...
Go
// Copyright 2010 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 pprof writes runtime profiling data in the format expected // by the pprof visualization tool. // For more information about pprof, see // http://co...
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. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go
// Copyright 2010 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. // Software IEEE754 64-bit floating point. // Only referred to (and thus linked in) by arm port // and by tests in this directory. package runtime const ( m...
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. // +build ignore /* Input to cgo. On a Debian Lenny arm linux distribution: cgo -cdefs defs_arm.c >arm/defs.h */ package runtime /* #cgo CFLAGS: -I/usr/src/...
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 runtime contains operations that interact with Go's runtime system, such as functions to control goroutines. It also includes the low-level type in...
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. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go
// Copyright 2010 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 runtime // The Error interface identifies a run time error. type Error interface { error // RuntimeError is a no-op function but // serves to disti...
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. // +build ignore /* Input to cgo -cdefs GOARCH=amd64 cgo -cdefs defs.go defs1.go >amd64/defs.h */ package runtime /* #include <ucontext.h> #include <fcntl.h...
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. // +build ignore /* Input to cgo. GOARCH=amd64 cgo -cdefs defs.go >amd64/defs.h GOARCH=386 cgo -cdefs defs.go >386/defs.h */ package runtime /* #include <si...
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. // +build ignore /* * Input to cgo -cdefs GOARCH=386 cgo -cdefs defs2.go >386/defs.h The asm header tricks we have to use for Linux on amd64 (see defs.c 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. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_openbsd.go >defs_openbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_openbsd.go >defs_op...
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. // +build ignore /* Input to cgo. GOARCH=amd64 cgo -cdefs defs.go >amd64/defs.h GOARCH=386 cgo -cdefs defs.go >386/defs.h */ package runtime /* #include <sy...
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 runtime // Breakpoint() executes a breakpoint trap. func Breakpoint() // LockOSThread wires the calling goroutine to its current operating system thre...
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. // +build ignore // Repeated malloc test. package main import ( "flag" "fmt" "runtime" "strconv" ) var chatty = flag.Bool("v", false, "chatty") var reve...
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. // +build ignore /* Input to cgo. GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h GOARCH=386 go tool cgo -cdefs defs_...
Go
// Copyright 2012 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 runtime // Compiler is the name of the compiler toolchain that built the // running binary. Known toolchains are: // // gc The 5g/6g/8g compiler...
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. // +build ignore /* Input to cgo -cdefs GOARCH=amd64 cgo -cdefs defs.go defs1.go >amd64/defs.h */ package runtime /* // Linux glibc and Linux kernel define ...
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 runtime import "unsafe" // A MemStats records statistics about the memory allocator. type MemStats struct { // General statistics. Alloc uint64...
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 pem implements the PEM data encoding, which originated in Privacy // Enhanced Mail. The most common use of PEM encoding today is in TLS keys and // c...
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 asn1 implements parsing of DER-encoded ASN.1 data structures, // as defined in ITU-T Rec X.690. // // See also ``A Layman's Guide to a Subset of ASN....
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 asn1 import ( "bytes" "fmt" "io" "math/big" "reflect" "time" ) // A forkableWriter is an in-memory buffer that can be // 'forked' to create new ...
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 asn1 import ( "reflect" "strconv" "strings" ) // ASN.1 objects have metadata preceding them: // the tag: the type of the object // a flag denot...
Go
// Copyright 2011 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 base32 implements base32 encoding as specified by RFC 4648. package base32 import ( "io" "strconv" ) /* * Encodings */ // An Encoding is a rad...
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. package gob import ( "bytes" "errors" "io" "reflect" "sync" ) // An Encoder manages the transmission of type and data information to the // other side 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 gob import ( "errors" "fmt" "os" "reflect" "sync" "unicode" "unicode/utf8" ) // userTypeInfo stores the information associated with a type 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. // +build ignore package main // Need to compile package gob with debug.go to build this program. // See comments in debug.go for how to do this. 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. /* Package gob manages streams of gobs - binary values exchanged between an Encoder (transmitter) and a Decoder (receiver). A typical use is transporting argum...
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" "math" "reflect" "unsafe" ) const uint64Size = int(unsafe.Sizeof(uint64(0))) // encoderState is the global execution state o...
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 ( "bufio" "bytes" "errors" "io" "reflect" "sync" ) // A Decoder manages the receipt of type and data information read from the // rem...
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" // Errors in decoding and encoding are handled using panic and recover. // Panics caused by user error (that is, everything except ru...
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. // Delete the next line to include in the gob package. // +build ignore package gob // This file is not normally included in the gob package. Used only for d...
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" "errors" "io" ...
Go
// Copyright 2011 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 xml import ( "fmt" "reflect" "strings" "sync" ) // typeInfo holds details for the xml representation of a type. type typeInfo struct { xmlname *...
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 xml implements a simple XML 1.0 parser that // understands XML name spaces. package xml // References: // Annotated XML spec: http://www.xml.com/...
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 xml import ( "bytes" "errors" "reflect" "strconv" "strings" "time" ) // BUG(rsc): Mapping between XML elements and data structures is inherentl...
Go
// Copyright 2011 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 xml import ( "bufio" "bytes" "fmt" "io" "reflect" "strconv" "strings" "time" ) const ( // A generic XML header suitable for use with the outp...
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 hex implements hexadecimal encoding and decoding. package hex import ( "bytes" "errors" "fmt" "io" ) const hextable = "0123456789abcdef" // En...
Go
// Copyright 2011 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 csv import ( "bufio" "io" "strings" "unicode" "unicode/utf8" ) // A Writer writes records to a CSV encoded file. // // As returned by NewWriter, ...
Go
// Copyright 2011 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 csv reads and writes comma-separated values (CSV) files. // // A csv file contains zero or more records of one or more fields per record. // Each rec...
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 binary implements translation between numbers and byte sequences // and encoding and decoding of varints. // // Numbers are translated by reading an...
Go
// Copyright 2011 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 binary // This file implements "varint" encoding of 64-bit integers. // The encoding is: // - unsigned integers are serialized 7 bits at a time, start...
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 ( "io" "strconv" ) /* * Encodings */ // An Encoding is a rad...
Go
// Copyright 2011 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 json import ( "strings" ) // tagOptions is the string following a comma in a struct field's "json" // tag, or the empty string. It does not include t...
Go
// Copyright 2010 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 json import ( "errors" "io" ) // A Decoder reads and decodes JSON objects from an input stream. type Decoder struct { r io.Reader buf []byte ...
Go
// Copyright 2010 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 json import "bytes" // Compact appends to dst the JSON-encoded src with // insignificant space characters elided. func Compact(dst *bytes.Buffer, src...
Go
// Copyright 2010 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 json implements encoding and decoding of JSON objects as defined in // RFC 4627. // // See "JSON and Go" for an introduction to this package: // htt...
Go
// Copyright 2010 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 json // JSON value parser state machine. // Just about at the limit of what is reasonable to write by hand. // Some parts are a bit tedious, but overa...
Go
// Copyright 2010 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. // Represents JSON data structure using native Go types: booleans, floats, // strings, arrays, and maps. package json import ( "encoding/base64" "errors" "...
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. // +build darwin freebsd linux netbsd openbsd package os import ( "errors" "runtime" "syscall" "time" ) func (p *Process) wait() (ps *ProcessState, err e...
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. // +build darwin freebsd linux netbsd openbsd windows package os import ( "syscall" ) // The only signal values guaranteed to be present on all systems // 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. // +build darwin freebsd linux netbsd openbsd package os import ( "io" "syscall" ) const ( blockSize = 4096 ) func (f *File) readdirnames(n int) (names [...
Go
// Copyright 2011 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 os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { a := sys1.(*dir) b := sys2.(*dir) return a.Qid.Path == b.Qid.Path && ...
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. // +build darwin freebsd linux netbsd openbsd package os import "syscall" func isExist(err error) bool { if pe, ok := err.(*PathError); ok { err = pe.Err ...
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 os import ( "errors" "runtime" "syscall" "time" ) // The only signal values guaranteed to be present on all systems // are Interrupt (send the pro...
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 os import ( "errors" "runtime" "syscall" "time" "unsafe" ) func (p *Process) wait() (ps *ProcessState, err error) { s, e := syscall.WaitForSingl...
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 os import ( "errors" "io" "syscall" ) var errShortStat = errors.New("short stat message") var errBadStat = errors.New("bad stat message format") f...
Go
// Copyright 2011 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 os import ( "runtime" "syscall" "time" ) // File represents an open file descriptor. type File struct { *file } // file is the real representatio...
Go
// Copyright 2010 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. // General environment variables. package os import "syscall" // Expand replaces ${var} or $var in the string based on the mapping function. // Invocations ...
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 os import "syscall" func hostname() (name string, err error) { s, e := syscall.ComputerName() if e != nil { return "", NewSyscallError("ComputerN...
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 os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { stat1 := sys1.(*syscall.Stat_t) stat2 := sys2.(*syscall.Stat_t) retur...
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 os import ( "io" "syscall" ) // MkdirAll creates a directory named path, // along with any necessary parents, and returns nil, // or else returns an...
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 os import ( "syscall" "time" ) // Getpagesize returns the underlying system's memory page size. func Getpagesize() int { return syscall.Getpagesize(...
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 os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { stat1 := sys1.(*syscall.Stat_t) stat2 := sys2.(*syscall.Stat_t) retur...
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 os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { stat1 := sys1.(*syscall.Stat_t) stat2 := sys2.(*syscall.Stat_t) retur...
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 os import ( "io" "runtime" "sync" "syscall" "unicode/utf16" ) // File represents an open file descriptor. type File struct { *file } // file is...
Go
// Copyright 2012 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 os import "time" // FindProcess looks for a running process by its pid. // The Process it returns can be used to obtain information // about the under...
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 os import ( "sync" "syscall" "time" "unsafe" ) // Stat returns the FileInfo structure describing file. // If there is an error, it will be of 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 os import ( "errors" ) // Portable analogs of some common system call errors. var ( ErrInvalid = errors.New("invalid argument") ErrPermission = ...
Go
// Copyright 2012 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 os import "syscall" func isExist(err error) bool { if pe, ok := err.(*PathError); ok { err = pe.Err } return err == syscall.ERROR_ALREADY_EXISTS ...
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 os import ( "syscall" ) // Getwd returns a rooted path name corresponding to the // current directory. If the current directory can be // reached vi...
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. // Process etc. package os import "syscall" // Args hold the command-line arguments, starting with the program name. var Args []string // Getuid returns the...
Go
// Copyright 2011 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 os func isExist(err error) bool { if err == nil { return false } if pe, ok := err.(*PathError); ok { err = pe.Err } return contains(err.Error(...
Go
// Copyright 2011 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. // +build !cgo,!windows package user import ( "fmt" "runtime" ) func init() { implemented = false } func Current() (*User, error) { return nil, fmt.Erro...
Go
// Copyright 2011 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 user allows user account lookups by name or id. package user import ( "strconv" ) var implemented = true // set to false by lookup_stubs.go's init...
Go
// Copyright 2011 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. // +build darwin freebsd linux // +build cgo package user import ( "fmt" "runtime" "strconv" "strings" "syscall" "unsafe" ) /* #include <unistd.h> #inc...
Go
// Copyright 2012 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 user import ( "fmt" "syscall" "unsafe" ) func lookupFullName(domain, username, domainAndUser string) (string, error) { // try domain controller fi...
Go
// Copyright 2011 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. // +build darwin freebsd linux netbsd openbsd package os const ( PathSeparator = '/' // OS-specific path separator PathListSeparator = ':' // OS-specifi...
Go
// Copyright 2010 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 exec import ( "errors" "os" "strings" ) // ErrNotFound is the error resulting if a path search failed to find an executable file. var ErrNotFound ...
Go
// Copyright 2010 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. // +build darwin freebsd linux netbsd openbsd package exec import ( "errors" "os" "strings" ) // ErrNotFound is the error resulting if a path search fail...
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 exec runs external commands. It wraps os.StartProcess to make it // easier to remap stdin and stdout, connect I/O with pipes, and do other // adjustm...
Go
// Copyright 2011 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 exec import ( "errors" "os" "strings" "syscall" ) // ErrNotFound is the error resulting if a path search failed to find an executable file. var E...
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 os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { stat1 := sys1.(*syscall.Stat_t) stat2 := sys2.(*syscall.Stat_t) retur...
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. // +build darwin freebsd linux netbsd openbsd windows package os import ( "syscall" "time" ) func sigpipe() // implemented in package runtime func epipech...
Go
// Copyright 2011 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 os const ( PathSeparator = '\\' // OS-specific path separator PathListSeparator = ';' // OS-specific path list separator ) // IsPathSeparator 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. package os import ( "syscall" "time" ) func sameFile(sys1, sys2 interface{}) bool { stat1 := sys1.(*syscall.Stat_t) stat2 := sys2.(*syscall.Stat_t) retur...
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. // +build darwin freebsd linux netbsd openbsd package os import ( "runtime" "syscall" ) // File represents an open file descriptor. type File struct { *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 os import ( "runtime" "syscall" ) // Process stores the information about a process created by StartProcess. type Process struct { Pid int hand...
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 os provides a platform-independent interface to operating system // functionality. The design is Unix-like, although the error handling is // Go-like...
Go
// Copyright 2011 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 os const ( PathSeparator = '/' // OS-specific path separator PathListSeparator = '\000' // OS-specific path list separator ) // IsPathSeparat...
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. // Linux-specific package os func hostname() (name string, err error) { f, err := Open("/proc/sys/kernel/hostname") if err != nil { return "", err } def...
Go
// Copyright 2012 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. // +build plan9 package signal import "os" func enableSignal(sig os.Signal) {}
Go
// Copyright 2012 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. // +build darwin freebsd linux netbsd openbsd windows package signal import ( "os" "syscall" ) // In assembly. func signal_enable(uint32) func signal_recv(...
Go
// Copyright 2012 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 signal implements access to incoming signals. package signal // BUG(rsc): This package is not yet implemented on Plan 9 and Windows. import ( "os"...
Go
// Copyright 2011 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. // Plan 9-specific package os func hostname() (name string, err error) { f, err := Open("#c/sysname") if err != nil { return "", err } defer f.Close() ...
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 os func (file *File) readdirnames(n int) (names []string, err error) { fis, err := file.Readdir(n) names = make([]string, len(fis)) for i, fi := ran...
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. // +build darwin freebsd netbsd openbsd // os code shared between *BSD systems including OS X (Darwin) // and FreeBSD. package os import "syscall" func host...
Go