Skip to content
This repository was archived by the owner on Jul 11, 2019. It is now read-only.

Commit db85421

Browse files
committed
improved readme
1 parent 316b1a3 commit db85421

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ftpd
22

3+
[中文](README_CN.md)
4+
35
A FTP server based on [github.com/goftp/server](http://github.com/goftp/server).
46

57
Full documentation for the package is available on [godoc](http://godoc.org/github.com/goftp/ftpd)
@@ -17,5 +19,7 @@ details:
1719

1820
host: 127.0.0.1
1921
port: 2121
20-
username: anonymous
21-
password: 1234
22+
username: admin
23+
password: 123456
24+
25+
More features, you can copy config.ini to the ftpd directory and modify it.

README_CN.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ftpd
2+
3+
[English](README.md)
4+
5+
这是一个基于 [github.com/goftp/server](http://github.com/goftp/server) 编写的Ftp服务器程序。
6+
7+
文档可以通过 [godoc](http://godoc.org/github.com/goftp/ftpd) 获取。
8+
9+
## 安装
10+
11+
go get github.com/goftp/ftpd
12+
13+
然后运行
14+
15+
$GOPATH/bin/ftpd
16+
17+
最后,通过FTP客户端连接即可:
18+
19+
host: 127.0.0.1
20+
port: 2121
21+
username: admin
22+
password: 123456
23+
24+
如需要进一步修改,可以拷贝config.ini文件到ftpd目录下,然后修改其中的配置

main.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"log"
65
"os"
76

87
"github.com/Unknwon/goconfig"
@@ -12,9 +11,14 @@ import (
1211
"github.com/goftp/leveldb-perm"
1312
"github.com/goftp/qiniu-driver"
1413
"github.com/goftp/server"
14+
"github.com/lunny/log"
1515
"github.com/syndtr/goleveldb/leveldb"
1616
)
1717

18+
var (
19+
version = "v0.1.11.2"
20+
)
21+
1822
var (
1923
cfg *goconfig.ConfigFile
2024
)
@@ -100,6 +104,7 @@ func main() {
100104

101105
// start ftp server
102106
ftpServer := server.NewServer(opt)
107+
log.Info("FTP Server", version)
103108
err = ftpServer.ListenAndServe()
104109
if err != nil {
105110
log.Fatal("Error starting server:", err)

0 commit comments

Comments
 (0)