摘要: cio.WithStdio 即为opt 因为 func NewAttach(opts ...Opt) task, err := container.Task(ctx, cio.NewAttach(cio.WithStdio)) if err != nil { return err } 1. cio. 阅读全文
posted @ 2025-02-27 11:16 rincloud 阅读(3) 评论(0) 推荐(0) 编辑
摘要: ❯ cat /etc/containerd/config.toml version = 3 root = '/var/lib/containerd' state = '/run/containerd' temp = '' plugin_dir = '' disabled_plugins = ["io 阅读全文
posted @ 2025-02-24 10:26 rincloud 阅读(0) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) func main() { x := 0 if x := test(); x < 0 { fmt.Println("first") fmt.Println(x) } else { fmt.Println("second") fmt.Prin 阅读全文
posted @ 2025-01-09 10:48 rincloud 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 进程树 root 33194 0.0 0.0 1166232 9472 pts/5 Sl 23:51 0:00 | | \_ runc-sandboxer --listen /run/runc-sandboxer.sock --dir /run/kuasar-runc root 33195 0.0 阅读全文
posted @ 2024-12-25 23:56 rincloud 阅读(5) 评论(0) 推荐(0) 编辑
摘要: package main import ( "bytes" "fmt" "io/ioutil" "os" "golang.org/x/sys/unix" ) func main(){ var events [128] unix.EpollEvent var buf [8]byte //unix.EF 阅读全文
posted @ 2024-11-07 18:35 rincloud 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Rust 的 Option 类型是一个枚举,有两个变体:Some 和 None ,表示值存在和不存在。 Result是一个枚举(enum),有两个变体:Ok和Err, 表示错误类型为空和err 阅读全文
posted @ 2024-10-11 15:43 rincloud 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 下载idea rust 插件:https://plugins.jetbrains.com/plugin/8182--deprecated-rust 下载idea:https://www.jetbrains.com/zh-cn/idea/download/other.html qt.qpa.scree 阅读全文
posted @ 2024-06-24 13:44 rincloud 阅读(94) 评论(0) 推荐(0) 编辑
摘要: # cargo Cargo是Rust的包管理器,它可以帮助开发者轻松地构建、依赖管理和打包 Rust 项目。以下是一些常用的Cargo指令: cargo new:创建一个新的 Rust 项目cargo build:编译当前项目cargo run:编译并运行当前项目cargo test:运行测试套件c 阅读全文
posted @ 2024-06-21 22:10 rincloud 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 在Rust中,iter(), into_iter(), iter_mut()都是用于在集合类型上创建迭代器的方法。这三个方法各有不同,下面一一进行介绍。 iter(): iter() 方法创建一个不可变的引用迭代器。当你只想读取集合中的元素,而不想改变它们或消耗集合时,应使用 iter()。iter 阅读全文
posted @ 2024-05-27 15:17 rincloud 阅读(467) 评论(0) 推荐(0) 编辑
摘要: ubuntu22 环境 1.dd if=/dev/zero of=btrfs.img bs=1m count=20002.losetup /dev/loop16 btrfs.img3.apt install btrfs-progs4.mkfs.btrfs -f /dev/loop165.mount 阅读全文
posted @ 2024-02-25 21:21 rincloud 阅读(84) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示