Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
encoding /
gob /
[ HOME SHELL ]
Name
Size
Permission
Action
codec_test.go
35.03
KB
-rw-r--r--
debug.go
18.19
KB
-rw-r--r--
dec_helpers.go
13.32
KB
-rw-r--r--
decgen.go
4.78
KB
-rw-r--r--
decode.go
38.99
KB
-rw-r--r--
decoder.go
6.76
KB
-rw-r--r--
doc.go
16.72
KB
-rw-r--r--
dump.go
557
B
-rw-r--r--
enc_helpers.go
9.94
KB
-rw-r--r--
encgen.go
3.75
KB
-rw-r--r--
encode.go
20.02
KB
-rw-r--r--
encoder.go
7.76
KB
-rw-r--r--
encoder_test.go
26.4
KB
-rw-r--r--
error.go
1.36
KB
-rw-r--r--
example_encdec_test.go
1.54
KB
-rw-r--r--
example_interface_test.go
2.14
KB
-rw-r--r--
example_test.go
1.41
KB
-rw-r--r--
gobencdec_test.go
18.38
KB
-rw-r--r--
timing_test.go
6.16
KB
-rw-r--r--
type.go
26.65
KB
-rw-r--r--
type_test.go
6.14
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : example_encdec_test.go
// Copyright 2013 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. package gob_test import ( "bytes" "encoding/gob" "fmt" "log" ) // The Vector type has unexported fields, which the package cannot access. // We therefore write a BinaryMarshal/BinaryUnmarshal method pair to allow us // to send and receive the type with the gob package. These interfaces are // defined in the "encoding" package. // We could equivalently use the locally defined GobEncode/GobDecoder // interfaces. type Vector struct { x, y, z int } func (v Vector) MarshalBinary() ([]byte, error) { // A simple encoding: plain text. var b bytes.Buffer fmt.Fprintln(&b, v.x, v.y, v.z) return b.Bytes(), nil } // UnmarshalBinary modifies the receiver so it must take a pointer receiver. func (v *Vector) UnmarshalBinary(data []byte) error { // A simple encoding: plain text. b := bytes.NewBuffer(data) _, err := fmt.Fscanln(b, &v.x, &v.y, &v.z) return err } // This example transmits a value that implements the custom encoding and decoding methods. func Example_encodeDecode() { var network bytes.Buffer // Stand-in for the network. // Create an encoder and send a value. enc := gob.NewEncoder(&network) err := enc.Encode(Vector{3, 4, 5}) if err != nil { log.Fatal("encode:", err) } // Create a decoder and receive a value. dec := gob.NewDecoder(&network) var v Vector err = dec.Decode(&v) if err != nil { log.Fatal("decode:", err) } fmt.Println(v) // Output: // {3 4 5} }
Close