![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
golang
a1658616397
这个作者很懒,什么都没留下…
展开
-
记一次简单的勒索加密
package mainimport ( "bytes" "crypto/aes" "crypto/cipher" "encoding/base64" "encoding/hex" "fmt" "io" "os" ps "path" "path/filepath" "strings")//func PKCS7Padding(ciphertext []byte, blockSize int) []byte { padding := blockSize - len(ciph.原创 2022-04-14 15:16:08 · 179 阅读 · 1 评论 -
golang 生成tpmodel
package mainimport ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/go-xorm/xorm" "io/ioutil" "os" "strings")var engine *xorm.Enginefunc main() { var err error engine, err = xorm.NewEngine("mysql", "") if err!=nil{ panic(err) } ta原创 2020-06-30 12:06:16 · 246 阅读 · 0 评论 -
golang 循环读取目录php文件得到bug
package mainimport ( "bufio" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "os" "strings" "time")type M struct { Code int `json:"code"`}type R struct { Url...原创 2019-12-12 14:35:44 · 227 阅读 · 0 评论 -
golang遍历目录分类文件
package mainimport ( "fmt" "io/ioutil" "os" "path")func main() { var s = "C:/manage" DirRead(s)}func DirRead(filepath string) bool { files, err := ioutil.ReadDir(filepath) if err != ni...原创 2019-09-18 11:01:33 · 439 阅读 · 0 评论 -
golang 通过ssh代理连接mysql
package mainimport ( "bytes" "context" "database/sql" "errors" "fmt" "github.com/go-sql-driver/mysql" "golang.org/x/crypto/ssh" "io" "io/ioutil" "net" "os")type ViaSSHDialer struct { c...原创 2019-09-16 16:02:05 · 3829 阅读 · 0 评论 -
golang 清理qq和浏览器下载的文件 按照日期分类
package mainimport ( "fmt" "io/ioutil" "os")func main(){ var s=[]string{"C:/Users/lq/Downloads","C:/Users/lq/Documents/Tencent Files/4416513613/FileRecv"} DirRead(s)}func DirRea...原创 2019-07-12 17:43:27 · 217 阅读 · 0 评论 -
golang实现单链表
package mainimport ( "fmt" "sync")type SingleObject interface {}type SingleNode struct { Data SingleObject Next *SingleNode}type SingleList struct { mutex *sync.RWMutex Head *SingleNo...转载 2019-07-02 17:50:17 · 151 阅读 · 0 评论 -
golang excel 导入mysql
package mainimport ( "fmt" "github.com/xuri/excelize" "log" "reflect" "strconv" "time")type ExcelData interface { CreateMap(arr []string) map[string]interface{} ChangeTim...转载 2019-07-02 17:45:27 · 1769 阅读 · 1 评论 -
用队列实现栈 golang 等大大佬解决错误
type MyStack struct { list *list.List}/** Initialize your data structure here. */func Constructor() *MyStack { //New创建一个链表。 list := list.New() return &MyStack{list}}/** ...原创 2019-04-09 10:24:46 · 101 阅读 · 0 评论 -
leetcode 用栈实现队列
type MyQueue struct { InputStack []int //输入栈 OutputStack []int //输出栈}/** Initialize your data structure here. */func Constructor() MyQueue { queue := MyQueue{[]int{}, []int{}} r...转载 2019-04-09 09:37:57 · 270 阅读 · 0 评论 -
go 多个协程访问
package mainimport ( "fmt" "io/ioutil" "net/http" "time")func main() { for{ for i:=0;i<10;i++{ go request("http://baidu.com") } time.Sleep(time.Secon...原创 2019-04-12 11:59:46 · 1324 阅读 · 0 评论 -
412. Fizz Buzz
func fizzBuzz(n int) []string { var str []string for i:=1;i<=n;i++{ if i%3==0&&i%5==0&&i>=5{ str=append(str,"FizzBuzz") continue ...原创 2019-03-29 12:47:54 · 88 阅读 · 0 评论