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 /
xml /
[ HOME SHELL ]
Name
Size
Permission
Action
atom_test.go
1.58
KB
-rw-r--r--
example_marshaling_test.go
1.49
KB
-rw-r--r--
example_test.go
3.72
KB
-rw-r--r--
example_text_marshaling_test.g...
1.39
KB
-rw-r--r--
marshal.go
28.93
KB
-rw-r--r--
marshal_test.go
62.59
KB
-rw-r--r--
read.go
21.73
KB
-rw-r--r--
read_test.go
28.19
KB
-rw-r--r--
typeinfo.go
9.3
KB
-rw-r--r--
xml.go
46.44
KB
-rw-r--r--
xml_test.go
23.08
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : example_marshaling_test.go
// Copyright 2018 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 xml_test import ( "encoding/xml" "fmt" "log" "strings" ) type Animal int const ( Unknown Animal = iota Gopher Zebra ) func (a *Animal) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { var s string if err := d.DecodeElement(&s, &start); err != nil { return err } switch strings.ToLower(s) { default: *a = Unknown case "gopher": *a = Gopher case "zebra": *a = Zebra } return nil } func (a Animal) MarshalXML(e *xml.Encoder, start xml.StartElement) error { var s string switch a { default: s = "unknown" case Gopher: s = "gopher" case Zebra: s = "zebra" } return e.EncodeElement(s, start) } func Example_customMarshalXML() { blob := ` <animals> <animal>gopher</animal> <animal>armadillo</animal> <animal>zebra</animal> <animal>unknown</animal> <animal>gopher</animal> <animal>bee</animal> <animal>gopher</animal> <animal>zebra</animal> </animals>` var zoo struct { Animals []Animal `xml:"animal"` } if err := xml.Unmarshal([]byte(blob), &zoo); err != nil { log.Fatal(err) } census := make(map[Animal]int) for _, animal := range zoo.Animals { 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