- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 5,666 for append2 (0.13 sec)
-
test/escape_reflect.go
func append1(s []int, x int) []int { // ERROR "leaking param: s$" sv := reflect.ValueOf(s) // ERROR "s escapes to heap" xv := reflect.ValueOf(x) // ERROR "x escapes to heap" rv := reflect.Append(sv, xv) // ERROR "... argument does not escape" return rv.Interface().([]int) } // Unfortunate: s doesn't need escape, only leak to result.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
src/internal/types/testdata/check/builtins0.go
_ = append(s, "foo"...) _ = append(S(s), "foo" /* ERRORx `cannot use .* in argument to append` */ ) _ = append(S(s), "foo"...) _ = append(s, t /* ERROR "cannot use t" */ ) _ = append(s, t...) _ = append(s, T("foo")...) _ = append(S(s), t /* ERROR "cannot use t" */ ) _ = append(S(s), t...) _ = append(S(s), T("foo")...) _ = append([]string{}, t /* ERROR "cannot use t" */ , "foo") _ = append([]T{}, t, "foo") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/appends/appends.go
"golang.org/x/tools/go/types/typeutil" ) //go:embed doc.go var doc string var Analyzer = &analysis.Analyzer{ Name: "appends", Doc: analysisutil.MustExtractDoc(doc, "appends"), URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/appends", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, } func run(pass *analysis.Pass) (interface{}, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.3K bytes - Viewed (0) -
src/cmd/vet/testdata/appends/appends.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file contains tests for the appends checker. package appends func AppendsTest() { sli := []string{"a", "b", "c"} sli = append(sli) // ERROR "append with no values"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 03 20:55:20 UTC 2023 - 338 bytes - Viewed (0) -
test/typeparam/append.go
type Recv <-chan int type sliceOf[E any] interface { ~[]E } func _Append[S sliceOf[T], T any](s S, t ...T) S { return append(s, t...) } func main() { recv := make(Recv) a := _Append([]Recv{recv}, recv) if len(a) != 2 || a[0] != recv || a[1] != recv { panic(a) } recv2 := make(chan<- int) a2 := _Append([]chan<- int{recv2}, recv2) if len(a2) != 2 || a2[0] != recv2 || a2[1] != recv2 { panic(a)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 597 bytes - Viewed (0) -
test/append1.go
// Verify that append arguments requirements are enforced by the // compiler. package main func main() { s := make([]int, 8) _ = append() // ERROR "missing arguments to append|not enough arguments for append" _ = append(s...) // ERROR "cannot use ... on first argument|not enough arguments in call to append"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 22:28:39 UTC 2022 - 856 bytes - Viewed (0) -
test/append.go
{"byte c", append([]byte{}, 0, 1, 2, 3), []byte{0, 1, 2, 3}}, {"byte d", append([]byte{0, 1, 2}), []byte{0, 1, 2}}, {"byte e", append([]byte{0, 1, 2}, 3), []byte{0, 1, 2, 3}}, {"byte f", append([]byte{0, 1, 2}, 3, 4, 5), []byte{0, 1, 2, 3, 4, 5}}, {"byte g", append([]byte{}, []byte{0}...), []byte{0}}, {"byte h", append([]byte{}, []byte{0, 1, 2, 3}...), []byte{0, 1, 2, 3}},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 06 04:28:23 UTC 2018 - 9.1K bytes - Viewed (0) -
internal/ioutil/append-file_windows.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package ioutil import ( "io" "os" "github.com/minio/minio/internal/lock" ) // AppendFile - appends the file "src" to the file "dst" func AppendFile(dst string, src string, osync bool) error { appendFile, err := lock.Open(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o666) if err != nil { return err }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 1.2K bytes - Viewed (0) -
internal/ioutil/append-file_nix.go
// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package ioutil import ( "io" "os" ) // AppendFile - appends the file "src" to the file "dst" func AppendFile(dst string, src string, osync bool) error { flags := os.O_WRONLY | os.O_APPEND | os.O_CREATE if osync { flags |= os.O_SYNC }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 1.3K bytes - Viewed (0) -
maven-model-builder/src/test/resources/poms/inheritance/no-append-urls3-expected.xml
<artifactId>inheritance</artifactId> <version>11-SNAPSHOT</version> <name>Model urls inheritance test child</name> <scm child.scm.connection.inherit.append.path="true" child.scm.developerConnection.inherit.append.path="true" child.scm.url.inherit.append.path="true"> <connection>scm:my-scm:http://domain.org/base</connection> <developerConnection>scm:my-scm:https://domain.org/base/</developerConnection>
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Thu Nov 07 15:16:39 UTC 2019 - 1.9K bytes - Viewed (0)