- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for init (0.15 sec)
-
src/cmd/cgo/doc.go
received from Go. For example: package main // typedef int (*intFunc) (); // // int // bridge_int_func(intFunc f) // { // return f(); // } // // int fortytwo() // { // return 42; // } import "C" import "fmt" func main() { f := C.intFunc(C.fortytwo) fmt.Println(int(C.bridge_int_func(f))) // Output: 42 }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/bytes/buffer_test.go
var testString string // test data for write tests var testBytes []byte // test data; same as testString but as a slice. type negativeReader struct{} func (r *negativeReader) Read([]byte) (int, error) { return -1, nil } func init() { testBytes = make([]byte, N) for i := 0; i < N; i++ { testBytes[i] = 'a' + byte(i%26) } testString = string(testBytes) } // Verify that contents of buf match the string s.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
doc/go_mem.html
</p> <h2 id="synchronization">Synchronization</h2> <h3 id="init">Initialization</h3> <p> Program initialization runs in a single goroutine, but that goroutine may create other goroutines, which run concurrently. </p> <p class="rule"> If a package <code>p</code> imports package <code>q</code>, the completion of <code>q</code>'s <code>init</code> functions happens before the start of any of <code>p</code>'s. </p>
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Mon Mar 04 15:54:42 GMT 2024 - 26.6K bytes - Viewed (0) -
src/archive/tar/common.go
Linkname string // Target name of link (valid for TypeLink or TypeSymlink) Size int64 // Logical file size in bytes Mode int64 // Permission and mode bits Uid int // User ID of owner Gid int // Group ID of owner Uname string // User name of owner Gname string // Group name of owner // If the Format is unspecified, then Writer.WriteHeader rounds ModTime
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24.7K bytes - Viewed (2) -
src/bytes/example_test.go
// a not equal b } } func ExampleCompare_search() { // Binary search to find a matching byte slice. var needle []byte var haystack [][]byte // Assume sorted i := sort.Search(len(haystack), func(i int) bool { // Return haystack[i] >= needle. return bytes.Compare(haystack[i], needle) >= 0 }) if i < len(haystack) && bytes.Equal(haystack[i], needle) { // Found it! } } func ExampleContains() {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/archive/zip/zip_test.go
} } func (r *rleBuffer) ReadAt(p []byte, off int64) (n int, err error) { if len(p) == 0 { return } skipParts := sort.Search(len(r.buf), func(i int) bool { part := &r.buf[i] return part.off+part.n > off }) parts := r.buf[skipParts:] if len(parts) > 0 { skipBytes := off - parts[0].off for _, part := range parts { repeat := int(min(part.n-skipBytes, int64(len(p)-n)))
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/builtin/builtin.go
// invocation. type Type int // Type1 is here for the purposes of documentation only. It is a stand-in // for any Go type, but represents the same type for any given function // invocation. type Type1 int // IntegerType is here for the purposes of documentation only. It is a stand-in // for any integer type: int, uint, int8 etc. type IntegerType int
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 12.7K bytes - Viewed (0) -
src/bytes/bytes.go
func IndexByte(b []byte, c byte) int { return bytealg.IndexByte(b, c) } func indexBytePortable(s []byte, c byte) int { for i, b := range s { if b == c { return i } } return -1 } // LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s. func LastIndex(s, sep []byte) int { n := len(sep) switch { case n == 0:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
lex lex.TokenReader lineNum int // Line number in source file. errorLine int // Line number of last error. errorCount int // Number of errors. sawCode bool // saw code in this file (as opposed to comments and blank lines) pc int64 // virtual PC; count of Progs; doesn't advance for GLOBL or DATA. input []lex.Token inputPos int
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/archive/tar/reader.go
if err := feedTokens(1); err != nil { return nil, err } numEntries, err := strconv.ParseInt(nextToken(), 10, 0) // Intentionally parse as native int if err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) { return nil, ErrHeader } // Parse for all member entries. // numEntries is trusted after this since a potential attacker must have
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0)