Rust学习之 命令行参数方式从指定的文件中搜索内容

源码放在了github上

Rust依赖包下载慢的问题

一般遇到这个问题都是因为程序包的服务器在国外,访问不通畅。常见的解决办法就是更换仓库源为国内的镜像。 在 ~/.cargo 目录下创建一个config文件,内容如下: [source.crates-io] replace-with = 'tuna' [source.tuna] registry = "https://mirror...

Go实现的TCP端口扫面器

使用Go实现的TCP端口扫描器 源码地址: https://github.com/jeffcail/tcp-scanner

Go使用qrcode包解析微信和支付宝二维码,生成一个链接(前端拿到链接即可解析成对应的支付二维码)

github.com/makiuchi-d/gozxing // uploadFile func uploadFile(c echo.Context) (error, string) { file, err := c.FormFile("qr_code") if err != nil { return err, "" } lastIndex := strings.LastIndex(file.File...

Go 编写开机自启动服务

需要用到的包 github.com/kardianos/service package main import ( "fmt" "os" "sync" "github.com/kardianos/service" ) type program struct { log service.Logger cfg *service.Config } f...

rust猜谜游戏

猜谜游戏 use std::io; use rand::Rng; use std::cmp::Ordering; fn main() { println!("Guess the number!"); let secret_number = rand::thread_rng().gen_range(1..=100); // println!("The secret number is: {secret_number}&qu...

mac安装rust

安装 官网给出的教程是: $ curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh 我用这种方式报错 于是采用笨方法 创建一个rust文件夹当作rust环境 2.访问 https://sh.rustup.rs 会自动下载一个rustup-init.sh shell脚本 移动脚本到刚才创...