Source File
id.go
Belonging Package
github.com/libp2p/go-libp2p/core/protocol
package protocol// ID is an identifier used to write protocol headers in streams.type ID string// These are reserved protocol.IDs.const (TestingID ID = "/p2p/_testing")// ConvertFromStrings is a convenience function that takes a slice of strings and// converts it to a slice of protocol.ID.func ( []string) ( []ID) {= make([]ID, 0, len())for , := range {= append(, ID())}return}// ConvertToStrings is a convenience function that takes a slice of protocol.ID and// converts it to a slice of strings.func ( []ID) ( []string) {= make([]string, 0, len())for , := range {= append(, string())}return}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |