Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for sortBy (0.26 sec)

  1. src/cmd/api/api_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"flag"
    	"fmt"
    	"go/build"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"sort"
    	"strings"
    	"sync"
    	"testing"
    )
    
    var flagCheck = flag.Bool("check", false, "run API checks")
    
    func TestMain(m *testing.M) {
    	flag.Parse()
    	for _, c := range contexts {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 04 17:31:12 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  2. src/bytes/example_test.go

    	}
    	if !bytes.Equal(a, b) {
    		// 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!
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. doc/asm.html

    directive declares the symbol <code>runtime·profileloop</code> and the instructions
    that follow form the body of the function.
    The last instruction in a <code>TEXT</code> block must be some sort of jump, usually a <code>RET</code> (pseudo-)instruction.
    (If it's not, the linker will append a jump-to-itself instruction; there is no fallthrough in <code>TEXTs</code>.)
    After the symbol, the arguments are flags (see below)
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Nov 28 19:15:27 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  4. doc/README.md

    new files. **Do not add RELNOTE=yes comments in CLs.** Instead, add a file to
    the CL (or ask the author to do so).
    
    At the end of the development cycle, the files will be merged by being
    concatenated in sorted order by pathname. Files in the directory matching the
    glob "*stdlib/*minor" are treated specially. They should be in subdirectories
    corresponding to standard library package paths, and headings for those package
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Fri Apr 26 21:24:36 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. src/archive/zip/zip_test.go

    // license that can be found in the LICENSE file.
    
    // Tests that involve both reading and writing.
    
    package zip
    
    import (
    	"bytes"
    	"errors"
    	"fmt"
    	"hash"
    	"internal/testenv"
    	"io"
    	"runtime"
    	"sort"
    	"strings"
    	"testing"
    	"time"
    )
    
    func TestOver65kFiles(t *testing.T) {
    	if testing.Short() && testenv.Builder() == "" {
    		t.Skip("skipping in short mode")
    	}
    	buf := new(strings.Builder)
    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)
  6. doc/go_spec.html

    The importing of packages, by construction, guarantees that there
    can be no cyclic initialization dependencies.
    More precisely:
    </p>
    
    <p>
    Given the list of all packages, sorted by import path, in each step the first
    uninitialized package in the list for which all imported packages (if any) are
    already initialized is <a href="#Package_initialization">initialized</a>.
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  7. src/cmd/api/main_test.go

    }
    
    func compareAPI(w io.Writer, features, required, exception []string) (ok bool) {
    	ok = true
    
    	featureSet := set(features)
    	exceptionSet := set(exception)
    
    	sort.Strings(features)
    	sort.Strings(required)
    
    	take := func(sl *[]string) string {
    		s := (*sl)[0]
    		*sl = (*sl)[1:]
    		return s
    	}
    
    	for len(features) > 0 || len(required) > 0 {
    		switch {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  8. src/buildall.bash

    selectedtargets() {
    	gettargets | grep -E "$pattern"
    }
    
    # put linux first in the target list to get all the architectures up front.
    linux_targets() {
    	selectedtargets | grep 'linux' | sort
    }
    
    non_linux_targets() {
    	selectedtargets | grep -v 'linux' | sort
    }
    
    # Note words in $targets are separated by both newlines and spaces.
    targets="$(linux_targets) $(non_linux_targets)"
    
    failed=false
    for target in $targets
    do
    	echo ""
    Shell Script
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 23 17:45:23 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. src/archive/tar/writer_test.go

    		bytes.Index(buf.Bytes(), []byte("baz=baz")),
    		bytes.Index(buf.Bytes(), []byte("foo=foo")),
    		bytes.Index(buf.Bytes(), []byte("qux=qux")),
    	}
    	if !sort.IntsAreSorted(indices) {
    		t.Fatal("PAX headers are not sorted")
    	}
    }
    
    func TestUSTARLongName(t *testing.T) {
    	// Create an archive with a path that failed to split with USTAR extension in previous versions.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  10. src/archive/tar/reader.go

    	// Do this because Seek is often lazy about reporting errors; this will mask
    	// the fact that the stream may be truncated. We can rely on the
    	// io.CopyN done shortly afterwards to trigger any IO errors.
    	var seekSkipped int64 // Number of bytes skipped via Seek
    	if sr, ok := r.(io.Seeker); ok && n > 1 {
    		// Not all io.Seeker can actually Seek. For example, os.Stdin implements
    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)
Back to top