Source File
literal.go
Belonging Package
golang.org/x/crypto/openpgp/packet
package packet
import (
)
func ( *LiteralData) () bool {
return .FileName == "_CONSOLE"
}
func ( *LiteralData) ( io.Reader) ( error) {
var [256]byte
_, = readFull(, [:2])
if != nil {
return
}
.IsBinary = [0] == 'b'
:= int([1])
_, = readFull(, [:])
if != nil {
return
}
.FileName = string([:])
_, = readFull(, [:4])
if != nil {
return
}
.Time = binary.BigEndian.Uint32([:4])
.Body =
return
}
func ( io.WriteCloser, bool, string, uint32) ( io.WriteCloser, error) {
var [4]byte
[0] = 't'
if {
[0] = 'b'
}
if len() > 255 {
= [:255]
}
[1] = byte(len())
, := serializeStreamHeader(, packetTypeLiteralData)
if != nil {
return
}
_, = .Write([:2])
if != nil {
return
}
_, = .Write([]byte())
if != nil {
return
}
binary.BigEndian.PutUint32([:], )
_, = .Write([:])
if != nil {
return
}
=
return
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |