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 Range 的性能提升Tip

Go 语言里使用 range 可以方便遍历数组(array)、切片(slice)、字典(map)和信道(chan)。这里主要关注他们的性能。...

Golang 时区时差处理方式

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

Golang quicktemplate 模版快速入门

Golang 有很多的模版引擎,自带的 `html/template` 也很好,大多数情况都能满足需求,只是有些逻辑、条件判断不好在模版里实现, `quicktemplate` 是个很好的选择。...

Write a Comment to "golang Note 起步"

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