摘要: 参考图片中文件命名,参考图片中选中代码,可以实现动态路由,路由效果如下: 访问http://localhost:3000/calculator/basic-calculator,http://localhost:3000/calculator/test 渲染的页面文件是pages/calculato 阅读全文
posted @ 2025-04-03 13:48 今天滴天气不错 阅读(45) 评论(0) 推荐(0)
摘要: package lottery import ( "fmt" "math/rand" "sort" "time" ) type Lottery struct { } func NewLottery() *Lottery { return &Lottery{} } type Prize struct 阅读全文
posted @ 2024-11-15 15:44 今天滴天气不错 阅读(44) 评论(0) 推荐(0)
摘要: package school import "fmt" func init() { fmt.Println("school包初始化了") } type School struct { } func (s *School) PrintSchool() { fmt.Println("我是一所学校") } 阅读全文
posted @ 2024-11-09 14:27 今天滴天气不错 阅读(4) 评论(0) 推荐(0)
摘要: <html lang="en"> <head> <meta charSet="UTF-8"> <title>Title</title> <style> .cart-list { padding: 4px; } .cart-item { position: relative; width: 100%; 阅读全文
posted @ 2023-11-10 10:30 今天滴天气不错 阅读(27) 评论(0) 推荐(0)
摘要: 参考博客:mac中使用docker搭建kafka集群 创建docker-compose.yml文件,分别是zookeeper、kafka、kafka-manager version: '2' services: kafka1: image: docker.io/wurstmeister/kafka 阅读全文
posted @ 2023-08-02 18:46 今天滴天气不错 阅读(156) 评论(0) 推荐(0)
摘要: 第一种方式: 使用json包 package main import ( "encoding/json" "fmt" "reflect" ) func main() { type User struct { Id int64 `json:"Id"` Name string `json:"Name"` 阅读全文
posted @ 2022-07-24 10:52 今天滴天气不错 阅读(525) 评论(0) 推荐(0)
摘要: 在当前用户目录下编辑 .gitconfig 增加 [alias] st = status co = checkout ci = commit br = branch df = diff 阅读全文
posted @ 2022-06-19 17:14 今天滴天气不错 阅读(200) 评论(0) 推荐(0)
摘要: m1芯片的电脑 执行以下命令修改权限 sudo chown -R $(whoami) $(brew --prefix)/* 阅读全文
posted @ 2022-06-19 16:33 今天滴天气不错 阅读(1515) 评论(0) 推荐(0)
摘要: git config --list git config --global user.name "Your Name" git config --global user.email "email@example.com" 创建SSH KEY ssh-keygen -t rsa -C "yourema 阅读全文
posted @ 2020-10-18 23:06 今天滴天气不错 阅读(95) 评论(0) 推荐(0)
摘要: 手写顺序 机读顺序 阅读全文
posted @ 2020-09-18 16:12 今天滴天气不错 阅读(205) 评论(0) 推荐(0)