week3

command
v0.0.0-...-12c6a5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 10 Imported by: 0

README

  1. 基于 errgroup 实现一个 http server 的启动和关闭 ,以及 linux signal 信号的注册和处理,要保证能够一个退出,全部注销退出。

答:总共开了三个 goroutine,用一个 goroutine 启动 http server,一个根据同步channel返回的结果关闭 http server,最后一个监听系统的信号,当收到关闭信号的时候关闭三个 goroutine

运行结果截图: 运行结果 运行结果

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL