Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
luckymrwang committed Dec 14, 2022
1 parent 5ac4a99 commit 9b61c34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web-frame/01-standard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func helloHandler(w http.ResponseWriter, req *http.Request) {

用 curl 这个工具测试一下,将会得到如下的结果。

```
```js
$ curl http://localhost:9999/
URL.Path = "/"
$ curl http://localhost:9999/hello
Expand Down Expand Up @@ -109,6 +109,8 @@ go.mod

## go.mod

[01-standard/base3/go.mod](/web-frame/01-standard/base3/go.mod)

```go
module example

Expand All @@ -121,6 +123,8 @@ replace spirit => ./spirit

## main.go

[01-standard/base3/main.go](/web-frame/01-standard/base3/main.go)

```go
package main

Expand Down Expand Up @@ -151,6 +155,8 @@ spirit 框架的设计以及 API 均参考了 gin。使用 New() 创建 gee 的

## spirit.go

[01-standard/base3/spirit/spirit.go](/web-frame/01-standard/spirit/spirit.go)

```go
package spirit

Expand Down Expand Up @@ -210,7 +216,7 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) {

执行 `go run main.go`,再用 curl 工具访问,结果与最开始的一致。

```
```js
$ curl http://localhost:9999/
URL.Path = "/"
$ curl http://localhost:9999/hello
Expand Down

0 comments on commit 9b61c34

Please sign in to comment.