Linux 120.141.167.72.host.secureserver.net 4.18.0-553.150.1.el8_10.x86_64 #1 SMP Fri Jul 31 15:23:31 EDT 2026 x86_64
Apache
: 72.167.141.120 | : 216.73.217.14
808 Domain
7.4.33
bestseocompany
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 /
mime /
[ HOME SHELL ]
Name
Size
Permission
Action
multipart
[ DIR ]
drwxr-xr-x
quotedprintable
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
encodedword.go
10
KB
-rw-r--r--
encodedword_test.go
6.98
KB
-rw-r--r--
example_test.go
2.95
KB
-rw-r--r--
grammar.go
828
B
-rw-r--r--
mediatype.go
9.76
KB
-rw-r--r--
mediatype_test.go
18.06
KB
-rw-r--r--
type.go
5.05
KB
-rw-r--r--
type_dragonfly.go
250
B
-rw-r--r--
type_freebsd.go
250
B
-rw-r--r--
type_openbsd.go
251
B
-rw-r--r--
type_plan9.go
1.04
KB
-rw-r--r--
type_test.go
4.9
KB
-rw-r--r--
type_unix.go
2.98
KB
-rw-r--r--
type_unix_test.go
945
B
-rw-r--r--
type_windows.go
1.22
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : example_test.go
// Copyright 2015 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 mime_test import ( "bytes" "fmt" "io" "mime" ) func ExampleWordEncoder_Encode() { fmt.Println(mime.QEncoding.Encode("utf-8", "¡Hola, señor!")) fmt.Println(mime.QEncoding.Encode("utf-8", "Hello!")) fmt.Println(mime.BEncoding.Encode("UTF-8", "¡Hola, señor!")) fmt.Println(mime.QEncoding.Encode("ISO-8859-1", "Caf\xE9")) // Output: // =?utf-8?q?=C2=A1Hola,_se=C3=B1or!?= // Hello! // =?UTF-8?b?wqFIb2xhLCBzZcOxb3Ih?= // =?ISO-8859-1?q?Caf=E9?= } func ExampleWordDecoder_Decode() { dec := new(mime.WordDecoder) header, err := dec.Decode("=?utf-8?q?=C2=A1Hola,_se=C3=B1or!?=") if err != nil { panic(err) } fmt.Println(header) dec.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) { switch charset { case "x-case": // Fake character set for example. // Real use would integrate with packages such // as code.google.com/p/go-charset content, err := io.ReadAll(input) if err != nil { return nil, err } return bytes.NewReader(bytes.ToUpper(content)), nil default: return nil, fmt.Errorf("unhandled charset %q", charset) } } header, err = dec.Decode("=?x-case?q?hello!?=") if err != nil { panic(err) } fmt.Println(header) // Output: // ¡Hola, señor! // HELLO! } func ExampleWordDecoder_DecodeHeader() { dec := new(mime.WordDecoder) header, err := dec.DecodeHeader("=?utf-8?q?=C3=89ric?= <eric@example.org>, =?utf-8?q?Ana=C3=AFs?= <anais@example.org>") if err != nil { panic(err) } fmt.Println(header) header, err = dec.DecodeHeader("=?utf-8?q?=C2=A1Hola,?= =?utf-8?q?_se=C3=B1or!?=") if err != nil { panic(err) } fmt.Println(header) dec.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) { switch charset { case "x-case": // Fake character set for example. // Real use would integrate with packages such // as code.google.com/p/go-charset content, err := io.ReadAll(input) if err != nil { return nil, err } return bytes.NewReader(bytes.ToUpper(content)), nil default: return nil, fmt.Errorf("unhandled charset %q", charset) } } header, err = dec.DecodeHeader("=?x-case?q?hello_?= =?x-case?q?world!?=") if err != nil { panic(err) } fmt.Println(header) // Output: // Éric <eric@example.org>, Anaïs <anais@example.org> // ¡Hola, señor! // HELLO WORLD! } func ExampleFormatMediaType() { mediatype := "text/html" params := map[string]string{ "charset": "utf-8", } result := mime.FormatMediaType(mediatype, params) fmt.Println("result:", result) // Output: // result: text/html; charset=utf-8 } func ExampleParseMediaType() { mediatype, params, err := mime.ParseMediaType("text/html; charset=utf-8") if err != nil { panic(err) } fmt.Println("type:", mediatype) fmt.Println("charset:", params["charset"]) // Output: // type: text/html // charset: utf-8 }
Close