README update

This commit is contained in:
John
2018-01-11 23:28:18 +08:00
parent 88f7aa11a4
commit 679ce82caf
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,15 @@
<div style="align: center">
![GoFrame](./gf-logo.png)
</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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB