- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ExampleDial (0.16 sec)
-
src/log/syslog/example_test.go
// license that can be found in the LICENSE file. //go:build !windows && !plan9 package syslog_test import ( "fmt" "log" "log/syslog" ) func ExampleDial() { sysLog, err := syslog.Dial("tcp", "localhost:1234", syslog.LOG_WARNING|syslog.LOG_DAEMON, "demotag") if err != nil { log.Fatal(err) } fmt.Fprintf(sysLog, "This is a daemon warning with demotag.")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 541 bytes - Viewed (0) -
src/crypto/tls/example_test.go
) // zeroSource is an io.Reader that returns an unlimited number of zero bytes. type zeroSource struct{} func (zeroSource) Read(b []byte) (n int, err error) { clear(b) return len(b), nil } func ExampleDial() { // Connecting with a custom root-certificate set. const rootPEM = ` -- GlobalSign Root R2, valid until Dec 15, 2021 -----BEGIN CERTIFICATE----- MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 18:23:49 UTC 2024 - 7.8K bytes - Viewed (0)