GolangNote

Golang笔记

golang Note 起步

Permalink

这是一个用Go 编写的,数据库由SSDB 驱动,轻量级的博客程序,性能超赞!

golang note

写这go blog 程序作为学习go 的入门作业,从此开启个人边用边学,边学边用的golang 之路。

Go: hello
1
2
3
4
5
6
7
package main

import "fmt"

func main() {
    fmt.Println("Hello, 世界")
}

联系: golangnote ( at ) gmail.com

实例运行

plaintext: log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
22:22:06.756266 Starting Goji on [::]:8000
22:22:14.772153 [-000001] Started GET "/" from 127.0.0.1:50821
22:22:14.775072 [-000001] Returning 200 in 2.876873ms
22:22:32.876193 [-000002] Started GET "/topic/1.html" from 127.0.0.1:51475
22:22:32.877913 [-000002] Returning 200 in 1.692703ms
22:22:36.737112 [-000004] Started GET "/" from 127.0.0.1:51629
22:22:36.740945 [-000004] Returning 200 in 3.805899ms
22:22:38.932546 [-000005] Started GET "/" from 127.0.0.1:51716
22:22:38.933814 [-000005] Returning 200 in 1.233359ms
22:22:43.121149 [-000007] Started GET "/topic/1.html" from 127.0.0.1:51862
22:22:43.122586 [-000007] Returning 200 in 1.413646ms
22:22:59.418817 [-000008] Started GET "/topic/1.html" from 127.0.0.1:52509
22:22:59.420201 [-000008] Returning 200 in 1.364403ms
22:23:02.772191 [-000009] Started GET "/tag/ssdb" from 127.0.0.1:52642
22:23:02.773833 [-000009] Returning 200 in 1.619439ms
22:23:06.790202 [-000010] Started GET "/topic/1.html" from 127.0.0.1:52771
22:23:06.791528 [-000010] Returning 200 in 1.307455ms

2021-02-24 更新

利用开源程序,作了点改写,把原来的数据导入,重新部署。

Related articles

Golang 单实例实现网站多域名请求

有时候写网站,为了统一的后端,把不同业务都集中到一个后端,这时就需要处理多域名的请求,在 Go http server 里实现很简单,只需把不同域名映射到不同的 `http.Handler`。...

Golang sync.WaitGroup 的 Wait 超时处理

sync.WaitGroup 使用 `Add(1)`、`Done()`、`Wait()`组合来实现多协程等待,如果某一协程未能合理处理错误,导致无法退出,此时需要引入超时机制。下面是一种超时处理方法。...

Write a Comment to "golang Note 起步"

Submit Comment Login
Based on Golang + fastHTTP + youdb | go1.16 Processed in 1ms