Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry-Mao committed May 12, 2016
1 parent 9790024 commit 568a6c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion proxy/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Auth struct {
}

// NewAuth
func NewAuth(c *conf.Config) (a *Auth, err error) {
func New(c *conf.Config) (a *Auth, err error) {
a = &Auth{}
a.c = c
return
Expand Down
2 changes: 1 addition & 1 deletion proxy/bfs/bfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Bfs struct {
c *conf.Config
}

func NewBfs(c *conf.Config) (b *Bfs) {
func New(c *conf.Config) (b *Bfs) {
b = &Bfs{}
b.c = c
return
Expand Down
2 changes: 1 addition & 1 deletion proxy/bucket/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (i *Item) Public(read bool) bool {
}

// NewBucket
func NewBucket() (b *Bucket, err error) {
func New() (b *Bucket, err error) {
var item *Item
b = new(Bucket)
b.data = make(map[string]*Item)
Expand Down
6 changes: 3 additions & 3 deletions proxy/http_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ type server struct {
func StartApi(c *conf.Config) (err error) {
var s = &server{}
s.c = c
s.bfs = bfs.NewBfs(c)
if s.bucket, err = ibucket.NewBucket(); err != nil {
s.bfs = bfs.New(c)
if s.bucket, err = ibucket.New(); err != nil {
return
}
if s.auth, err = auth.NewAuth(c); err != nil {
if s.auth, err = auth.New(c); err != nil {
return
}
go func() {
Expand Down

0 comments on commit 568a6c7

Please sign in to comment.