mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
README update
This commit is contained in:
12
README.MD
12
README.MD
@ -1,3 +1,15 @@
|
||||
<div style="align: center">
|
||||

|
||||
</div>
|
||||
|
||||
## 介绍
|
||||
gf(Go Frame)是一款为Web服务及网络服务开发设计的,模块化、低耦合、轻量级的Go语言开发框架。
|
||||
实现了通用的HTTP/TCP/UDP Server,并提供了Web服务开发的系列核心组件,
|
||||
包括:MVC、Cookie、Session、模板引擎、路由控制、配置管理、数据校验、数据库操作等等,
|
||||
并且提供了数十个实用开发模块,包括:缓存模块、日志模块、JSON模块、命令行模块、环境变量模块、并发安全容器等等。
|
||||
|
||||
gf是开源的,免费的,基于MIT协议进行分发,开源项目地址:https://gitee.com/johng/gf
|
||||
|
||||
## 安装
|
||||
```
|
||||
go get -u gitee.com/johng/gf
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package demo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitee.com/johng/gf/g/os/gfile"
|
||||
"gitee.com/johng/gf/g/net/ghttp"
|
||||
)
|
||||
@ -13,7 +12,7 @@ func Upload(r *ghttp.Request) {
|
||||
buffer := make([]byte, h.Size)
|
||||
f.Read(buffer)
|
||||
gfile.PutBinContents("/tmp/" + fname, buffer)
|
||||
r.Response.WriteString(fmt.Sprintf("%s upload success, input value:%s", fname, r.GetPostString("name")))
|
||||
r.Response.WriteString(fname + " uploaded successly"))
|
||||
} else {
|
||||
r.Response.WriteString(e.Error())
|
||||
}
|
||||
@ -27,7 +26,6 @@ func UploadShow(r *ghttp.Request) {
|
||||
</head>
|
||||
<body>
|
||||
<form enctype="multipart/form-data" action="/upload" method="post">
|
||||
<input type="input" name="name" />
|
||||
<input type="file" name="upload-file" />
|
||||
<input type="submit" value="upload" />
|
||||
</form>
|
||||
|
||||
BIN
gf-logo.png
Normal file
BIN
gf-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user