Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for append (0.21 sec)

  1. src/cmd/cgo/internal/test/issue18146.go

    				}
    			}()
    		}
    		runtime.GOMAXPROCS(threads)
    		argv := append(os.Args, "-test.run=^$")
    		if err := syscall.Exec(os.Args[0], argv, os.Environ()); err != nil {
    			t.Fatal(err)
    		}
    	}
    
    	var cmds []*exec.Cmd
    	defer func() {
    		for _, cmd := range cmds {
    			cmd.Process.Kill()
    		}
    	}()
    
    	args := append(append([]string(nil), os.Args[1:]...), "-test.run=^Test18146$")
    	for n := attempts; n > 0; n-- {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/swig/swig_test.go

    }
    
    func run(t *testing.T, dir string, lto bool, args ...string) {
    	runArgs := append([]string{"run", "."}, args...)
    	cmd := exec.Command("go", runArgs...)
    	cmd.Dir = dir
    	if lto {
    		const cflags = "-flto -Wno-lto-type-mismatch -Wno-unknown-warning-option"
    		cmd.Env = append(cmd.Environ(),
    			"CGO_CFLAGS="+cflags,
    			"CGO_CXXFLAGS="+cflags,
    			"CGO_LDFLAGS="+cflags)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. src/cmd/cgo/ast.go

    		switch c[1] {
    		case '/':
    			//-style comment (no newline at the end)
    			c = c[2:] + "\n"
    		case '*':
    			/*-style comment */
    			c = c[2 : len(c)-2]
    		}
    		pieces = append(pieces, c)
    	}
    	return strings.Join(pieces, "")
    }
    
    func (f *File) validateIdents(x interface{}, context astContext) {
    	if x, ok := x.(*ast.Ident); ok {
    		if f.isMangledName(x.Name) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  4. src/archive/zip/fuzz_test.go

    		}
    		files := []file{}
    
    		for _, f := range r.File {
    			fr, err := f.Open()
    			if err != nil {
    				continue
    			}
    			content, err := io.ReadAll(fr)
    			if err != nil {
    				continue
    			}
    			files = append(files, file{header: &f.FileHeader, content: content})
    			if _, err := r.Open(f.Name); err != nil {
    				continue
    			}
    		}
    
    		// If we were unable to read anything out of the archive don't
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  5. src/bufio/bufio_test.go

    	for i := 0; i < 100; i++ {
    		// Obtain a buffer to append to.
    		b := w.AvailableBuffer()
    		if w.Available() != cap(b) {
    			t.Fatalf("Available() = %v, want %v", w.Available(), cap(b))
    		}
    
    		// While not recommended, it is valid to append to a shifted buffer.
    		// This forces Write to copy the input.
    		if rn.Intn(8) == 0 && cap(b) > 0 {
    			b = b[1:1:cap(b)]
    		}
    
    		// Append a random integer of varying width.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/asm/pseudo_test.go

    	"strings"
    	"testing"
    
    	"cmd/asm/internal/lex"
    )
    
    func tokenize(s string) [][]lex.Token {
    	res := [][]lex.Token{}
    	if len(s) == 0 {
    		return res
    	}
    	for _, o := range strings.Split(s, ",") {
    		res = append(res, lex.Tokenize(o))
    	}
    	return res
    }
    
    func TestErroneous(t *testing.T) {
    
    	type errtest struct {
    		pseudo   string
    		operands string
    		expected string
    	}
    
    	nonRuntimeTests := []errtest{
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  7. src/builtin/builtin.go

    //	slice = append(slice, anotherSlice...)
    //
    // As a special case, it is legal to append a string to a byte slice, like this:
    //
    //	slice = append([]byte("hello "), "world"...)
    func append(slice []Type, elems ...Type) []Type
    
    // The copy built-in function copies elements from a source slice into a
    // destination slice. (As a special case, it also will copy bytes from a
    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)
  8. src/cmd/asm/internal/lex/input.go

    	var tokens []Token
    	for _, tok := range macro.tokens {
    		if tok.ScanToken != scanner.Ident {
    			tokens = append(tokens, tok)
    			continue
    		}
    		substitution := actuals[tok.text]
    		if substitution == nil {
    			tokens = append(tokens, tok)
    			continue
    		}
    		tokens = append(tokens, substitution...)
    	}
    	in.Push(NewSlice(in.Base(), in.Line(), tokens))
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  9. src/archive/tar/writer.go

    				spb = append(strconv.AppendInt(spb, s.Offset, 10), '\n')
    				spb = append(strconv.AppendInt(spb, s.Length, 10), '\n')
    			}
    			pad := blockPadding(int64(len(spb)))
    			spb = append(spb, zeroBlock[:pad]...)
    			hdr.Size += int64(len(spb)) // Accounts for encoded sparse map
    
    			// Add and modify appropriate PAX records.
    			dir, file := path.Split(realName)
    			hdr.Name = path.Join(dir, "GNUSparseFile.0", file)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  10. doc/go1.17_spec.html

    s3 := append(s2, s0...)            // append a slice              s3 == []int{0, 0, 2, 3, 5, 7, 0, 0}
    s4 := append(s3[3:6], s3[2:]...)   // append overlapping slice    s4 == []int{3, 5, 7, 2, 3, 5, 7, 0, 0}
    
    var t []interface{}
    t = append(t, 42, 3.1415, "foo")   //                             t == []interface{}{42, 3.1415, "foo"}
    
    var b []byte
    b = append(b, "bar"...)            // append string contents      b == []byte{'b', 'a', 'r' }
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
Back to top