6

学习周刊-总第100期-2023年第13周

 1 year ago
source link: https://wiki.eryajf.net/pages/6a3264/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

学习周刊-总第100期-2023年第13周

文章发布较早,内容可能过时,阅读注意甄别。

# 0 ,前言

周刊维护在:https://github.com/eryajf/learning-weekly (opens new window) 欢迎投稿,推荐或自荐项目 /文章 /博客,请提交 issue 。

周刊核心为运维周刊,还会侧重Go语言生态,Vue相关技术生态的项目,以及 GitHub 上优秀项目或经验。

你也可以在我的博客 https://wiki.eryajf.net/learning-weekly/ (opens new window) 查看汇总周刊。

# 1,优秀项目



  • 项目地址:ship (opens new window)
  • 项目说明:一个灵活、强大、高性能和极简主义的 Go Web HTTP 路由器框架。看了下示例,感觉预发很清晰简洁,可以一式。
package main

import (
	"github.com/xgfone/ship/v5"
	"github.com/xgfone/ship/v5/middleware"
)

func main() {
	router := ship.New()
	router.Use(middleware.Logger(), middleware.Recover()) // Use the middlewares.

	router.Route("/ping").GET(func(c *ship.Context) error {
		return c.JSON(200, map[string]interface{}{"message": "pong"})
	})

	group := router.Group("/group")
	group.Route("/ping").GET(func(c *ship.Context) error {
		return c.Text(200, "group")
	})

	subgroup := group.Group("/subgroup")
	subgroup.Route("/ping").GET(func(c *ship.Context) error {
		return c.Text(200, "subgroup")
	})

	// Start the HTTP server.
	ship.StartServer(":8080", router)
	// or
	// http.ListenAndServe(":8080", router)
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


# 2,优秀文章




# 3,优秀博客





微信
支付宝
上次更新: 2023/03/31, 08:39:15

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK