All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login

All New Login

All gists matching topic go

Recently created
Least recently created
Recently updated
Least recently updated

jetsung / copy.go

0 likes
0 forks
1 files
Last active 1 month ago
Go 语言文件和文件夹复制 转:https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
copy file folder go
1 /* MIT License
2 *
3 * Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:

jetsung / gbkbig5.go

0 likes
0 forks
1 files
Last active 1 month ago
Golang GBK Big5 from/to UTF-8 转换 转自:https://gist.github.com/zhang0098/c691e1da5bbdc7f41ca5
big5 gbk go
1 import (
2 "bytes"
3 "io/ioutil"
4 "golang.org/x/text/encoding/traditionalchinese"
5 "golang.org/x/text/encoding/simplifiedchinese"
6 "golang.org/x/text/transform"
7 )
8 //convert GBK to UTF-8
9 func Decodegbk(s []byte) ([]byte, error) {
10 I := bytes.NewReader(s)
Newer Older

Powered by Opengist ⋅ Load: 83ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ 爱开发 ⋅ 爱开发社区