Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for wrapping (0.18 sec)

  1. src/cmd/asm/internal/lex/tokenizer.go

    package lex
    
    import (
    	"go/build/constraint"
    	"io"
    	"os"
    	"strings"
    	"text/scanner"
    	"unicode"
    
    	"cmd/asm/internal/flags"
    	"cmd/internal/objabi"
    	"cmd/internal/src"
    )
    
    // A Tokenizer is a simple wrapping of text/scanner.Scanner, configured
    // for our purposes and made a TokenReader. It forms the lowest level,
    // turning text from readers into tokens.
    type Tokenizer struct {
    	tok  ScanToken
    	s    *scanner.Scanner
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  2. src/bufio/example_test.go

    	// Output: 15
    }
    
    // Use a Scanner with a custom split function (built by wrapping ScanWords) to validate
    // 32-bit decimal input.
    func ExampleScanner_custom() {
    	// An artificial input source.
    	const input = "1234 5678 1234567901234567890"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    	// Create a custom split function by wrapping the existing ScanWords function.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. internal/deadlineconn/deadlineconn.go

    }
    
    // WithWriteDeadline sets a new write side net.Conn deadline.
    func (c *DeadlineConn) WithWriteDeadline(d time.Duration) *DeadlineConn {
    	c.writeDeadline = d
    	return c
    }
    
    // New - creates a new connection object wrapping net.Conn with deadlines.
    func New(c net.Conn) *DeadlineConn {
    	return &DeadlineConn{
    		Conn: c,
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  4. internal/ioutil/ioutil.go

    	return &LimitWriter{w, skipBytes, limit}
    }
    
    type nopCloser struct {
    	io.Writer
    }
    
    func (nopCloser) Close() error { return nil }
    
    // NopCloser returns a WriteCloser with a no-op Close method wrapping
    // the provided Writer w.
    func NopCloser(w io.Writer) io.WriteCloser {
    	return nopCloser{w}
    }
    
    // SkipReader skips a given number of bytes and then returns all
    // remaining data.
    type SkipReader struct {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  5. misc/cgo/gmp/gmp.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.
    
    /*
    An example of wrapping a C library in Go. This is the GNU
    multiprecision library gmp's integer type mpz_t wrapped to look like
    the Go package big's integer type Int.
    
    This is a syntactically valid Go program—it can be parsed with the Go
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  6. src/bufio/scan_test.go

    		}
    	}
    	if s.Err() != nil {
    		t.Fatal("after scan:", s.Err())
    	}
    }
    
    // negativeEOFReader returns an invalid -1 at the end, as though it
    // were wrapping the read system call.
    type negativeEOFReader int
    
    func (r *negativeEOFReader) Read(p []byte) (int, error) {
    	if *r > 0 {
    		c := int(*r)
    		if c > len(p) {
    			c = len(p)
    		}
    		for i := 0; i < c; i++ {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  7. misc/go_android_exec/main.go

    	// However, if the os.Stderr (or os.Stdout) file descriptors are
    	// passed on, the hanging adb subprocess will hold them open and
    	// go test will hang forever.
    	//
    	// Avoid that by wrapping stderr, breaking the short circuit and
    	// forcing cmd.Run to use another pipe and goroutine to pass
    	// along stderr from adb.
    	cmd.Stderr = struct{ io.Writer }{os.Stderr}
    	err := cmd.Run()
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/lex/lex.go

    package lex
    
    import (
    	"fmt"
    	"log"
    	"os"
    	"strings"
    	"text/scanner"
    
    	"cmd/internal/src"
    )
    
    // A ScanToken represents an input item. It is a simple wrapping of rune, as
    // returned by text/scanner.Scanner, plus a couple of extra values.
    type ScanToken rune
    
    const (
    	// Asm defines some two-character lexemes. We make up
    	// a rune/ScanToken value for them - ugly but simple.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  9. cmd/api-router.go

    			tracedHandler = httpTraceHdrs(f)
    		} else {
    			tracedHandler = httpTraceAll(f)
    		}
    
    		// Skip wrapping with the gzip middleware if specified.
    		var gzippedHandler http.HandlerFunc = tracedHandler
    		if !handlerFlags.has(noGZS3HFlag) {
    			gzippedHandler = gzipHandler(gzippedHandler)
    		}
    
    		// Skip wrapping with throttling middleware if specified.
    		var throttledHandler http.HandlerFunc = gzippedHandler
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 04 18:05:56 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  10. cmd/sts-handlers.go

    	}
    
    	// We map the X.509 subject common name to the policy. So, a client
    	// with the common name "foo" will be associated with the policy "foo".
    	// Other mapping functions - e.g. public-key hash based mapping - are
    	// possible but not implemented.
    	//
    	// Group mapping is not possible with standard X.509 certificates.
    	if certificate.Subject.CommonName == "" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 18:36:18 GMT 2024
    - 34.7K bytes
    - Viewed (2)
Back to top