- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 45 for example (0.2 sec)
-
src/archive/tar/example_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package tar_test import ( "archive/tar" "bytes" "fmt" "io" "log" "os" ) func Example_minimal() { // Create and add some files to the archive. var buf bytes.Buffer tw := tar.NewWriter(&buf) var files = []struct { Name, Body string }{ {"readme.txt", "This archive contains some text files."},
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Nov 16 16:54:08 GMT 2017 - 1.4K bytes - Viewed (0) -
src/bytes/example_test.go
cui fliter <******@****.***> 1709194171 +0800
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/bufio/example_test.go
favonia <******@****.***> 1684978995 -0400
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 4.9K bytes - Viewed (0) -
src/archive/zip/example_test.go
var files = []struct { Name, Body string }{ {"readme.txt", "This archive contains some text files."}, {"gopher.txt", "Gopher names:\nGeorge\nGeoffrey\nGonzo"}, {"todo.txt", "Get animal handling licence.\nWrite more examples."}, } for _, file := range files { f, err := w.Create(file.Name) if err != nil { log.Fatal(err) } _, err = f.Write([]byte(file.Body)) if err != nil { log.Fatal(err) } }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Jan 27 00:22:03 GMT 2016 - 2K bytes - Viewed (0) -
src/cmd/cgo/doc.go
Note that the arguments are for "gcc", not "ld". Example: //go:cgo_ldflag "-lpthread" //go:cgo_ldflag "-L/usr/local/sqlite3/lib" A package compiled with cgo will include directives for both internal and external linking; the linker will select the appropriate subset for the chosen linking mode. Example As a simple example, consider a package that uses cgo to call C.sin.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/bootstrap.bash
#!/usr/bin/env bash # Copyright 2015 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. # When run as (for example) # # GOOS=linux GOARCH=ppc64 bootstrap.bash # # this script cross-compiles a toolchain for that GOOS/GOARCH # combination, leaving the resulting tree in ../../go-${GOOS}-${GOARCH}-bootstrap. # That tree can be copied to a machine of the given target type
Shell Script - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Jan 20 17:52:26 GMT 2023 - 2.3K bytes - Viewed (0) -
src/bufio/bufio_test.go
} } func TestNoUnreadRuneAfterPeek(t *testing.T) { br := NewReader(strings.NewReader("example")) br.ReadRune() br.Peek(1) if err := br.UnreadRune(); err == nil { t.Error("UnreadRune didn't fail after Peek") } } func TestNoUnreadByteAfterPeek(t *testing.T) { br := NewReader(strings.NewReader("example")) br.ReadByte() br.Peek(1) if err := br.UnreadByte(); err == nil {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
misc/ios/README
set to the clang wrapper that invokes clang for iOS. For example, this command runs all.bash on the iOS emulator: GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/ios/clangwrap.sh ./all.bash If CC_FOR_TARGET is not set when the toolchain is built (make.bash or all.bash), CC can be set on the command line. For example, GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC=$(go env GOROOT)/misc/ios/clangwrap.sh go build
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Tue Dec 29 21:49:26 GMT 2020 - 2.7K bytes - Viewed (0) -
.github/ISSUE_TEMPLATE/02-pkgsite-removal.yml
id: package-path attributes: label: "What is the path of the package that you would like to have removed?" description: | We can remove packages with a shared path prefix. For example, a request for 'github.com/author' would remove all pkg.go.dev pages with that package path prefix. validations: required: true - type: textarea id: package-owner attributes:
Others - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Jan 04 23:31:17 GMT 2024 - 1.9K bytes - Viewed (0) -
src/README.vendor
There are two modules, std and cmd, defined in src/go.mod and src/cmd/go.mod. When a package outside std or cmd is imported by a package inside std or cmd, the import path is interpreted as if it had a "vendor/" prefix. For example, within "crypto/tls", an import of "golang.org/x/crypto/cryptobyte" resolves to "vendor/golang.org/x/crypto/cryptobyte". When a package with the same path is imported from a package outside std or cmd, it will
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Tue Apr 02 02:20:05 GMT 2024 - 2.2K bytes - Viewed (0)