Skip to content

Commit

Permalink
fixed golint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xujiajun committed Oct 15, 2018
1 parent b28dd9c commit 098ee21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import (

var DefaultMinTokenLen = 2

// DictRecord records dict meta info
type DictRecord struct {
TF string
Token string
POS string //part of speech
}

// Dict records Records and DictPath etc.
type Dict struct {
Records map[string]DictRecord
minTokenLen int
Expand All @@ -24,6 +26,7 @@ type Dict struct {
isLoaded bool
}

// NewDict returns a newly initialized Dict object
func NewDict(dictPath string) *Dict {
return &Dict{
Records: make(map[string]DictRecord),
Expand All @@ -33,6 +36,7 @@ func NewDict(dictPath string) *Dict {
}
}

// Load that loads Dict
func (dict *Dict) Load() error {
if dict.isLoaded {
return errors.New("dict isLoaded")
Expand Down

0 comments on commit 098ee21

Please sign in to comment.