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 /
json /
[ HOME SHELL ]
Name
Size
Permission
Action
testdata
[ DIR ]
drwxr-xr-x
bench_test.go
8.59
KB
-rw-r--r--
decode.go
34.97
KB
-rw-r--r--
decode_test.go
59.67
KB
-rw-r--r--
encode.go
37.32
KB
-rw-r--r--
encode_test.go
27.14
KB
-rw-r--r--
example_marshaling_test.go
1.23
KB
-rw-r--r--
example_test.go
6.07
KB
-rw-r--r--
example_text_marshaling_test.g...
1.23
KB
-rw-r--r--
fold.go
3.39
KB
-rw-r--r--
fold_test.go
2.89
KB
-rw-r--r--
fuzz.go
780
B
-rw-r--r--
indent.go
3.4
KB
-rw-r--r--
number_test.go
2.2
KB
-rw-r--r--
scanner.go
15.66
KB
-rw-r--r--
scanner_test.go
6.16
KB
-rw-r--r--
stream.go
12.92
KB
-rw-r--r--
stream_test.go
11.2
KB
-rw-r--r--
tables.go
4.16
KB
-rw-r--r--
tagkey_test.go
2.67
KB
-rw-r--r--
tags.go
1.05
KB
-rw-r--r--
tags_test.go
565
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : example_marshaling_test.go
// Copyright 2016 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 json_test import ( "encoding/json" "fmt" "log" "strings" ) type Animal int const ( Unknown Animal = iota Gopher Zebra ) func (a *Animal) UnmarshalJSON(b []byte) error { var s string if err := json.Unmarshal(b, &s); err != nil { return err } switch strings.ToLower(s) { default: *a = Unknown case "gopher": *a = Gopher case "zebra": *a = Zebra } return nil } func (a Animal) MarshalJSON() ([]byte, error) { var s string switch a { default: s = "unknown" case Gopher: s = "gopher" case Zebra: s = "zebra" } return json.Marshal(s) } func Example_customMarshalJSON() { blob := `["gopher","armadillo","zebra","unknown","gopher","bee","gopher","zebra"]` var zoo []Animal if err := json.Unmarshal([]byte(blob), &zoo); err != nil { log.Fatal(err) } census := make(map[Animal]int) for _, animal := range zoo { census[animal] += 1 } fmt.Printf("Zoo Census:\n* Gophers: %d\n* Zebras: %d\n* Unknown: %d\n", census[Gopher], census[Zebra], census[Unknown]) // Output: // Zoo Census: // * Gophers: 3 // * Zebras: 2 // * Unknown: 3 }
Close