Skip to content

Commit

Permalink
Merge pull request #3 from syntaqx/patch/opts-0-value
Browse files Browse the repository at this point in the history
Remove the unnecessary logic for setting the default value of opt
  • Loading branch information
syntaqx authored Jan 17, 2019
2 parents 3ba86b4 + 87db48a commit 4c973e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ type FileServer struct {
// NewFileServer initializes a FileServer.
func NewFileServer(options ...Options) *FileServer {
var opt Options
if len(options) == 0 {
opt = Options{}
} else {
if len(options) > 0 {
opt = options[0]
}

Expand Down

0 comments on commit 4c973e1

Please sign in to comment.