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 更新

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

本文网址: https://golangnote.com/topic/1.html 转摘请注明来源

Related articles

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

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

谷歌翻译的 golang 库推荐

Google 的翻译越来越好了,官方的Golang SDK 已经很完美,这里介绍的是几个非官方发布的有特色的库。...

Golang WebAssembly 了解一下

Go 1.11 起开始支持 WebAssembly ,也就是说以后可以使用任何语言作为“前端语言”来进行 Web 开发。...

Golang 时区时差处理方式

个人习惯用 0 时区时间戳记录时间,可以方便转到不同时区,下面介绍 Golang 时区时差处理...

Write a Comment to "golang Note 起步"

Submit Comment Login
Based on Golang + fastHTTP + sdb | go1.22.3 Processed in 1ms