-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jiangz222/lineerror
fix line error
- Loading branch information
Showing
12 changed files
with
60 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package qmgo | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
"time" | ||
) | ||
|
||
func TestNow(t *testing.T) { | ||
t1 := time.Unix(0, time.Now().UnixNano()/1e6*1e6) | ||
t2 := Now() | ||
fmt.Println(t1, t2) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
package qmgo | ||
|
||
import "errors" | ||
import ( | ||
"errors" | ||
|
||
"go.mongodb.org/mongo-driver/mongo" | ||
) | ||
|
||
var ( | ||
ERR_QUERY_NOT_SLICE_POINTER = errors.New("result argument must be a pointer to a slice") | ||
ERR_QUERY_NOT_SLICE_TYPE = errors.New("result argument must be a slice address") | ||
ERR_QUERY_RESULT_TYPE_INCONSISTEN = errors.New("result type is not equal mongodb value type") | ||
ERR_QUERY_RESULT_VAL_CAN_NOT_CHANGE = errors.New("the value of result can not be changed") | ||
ERR_NO_SUCH_RECORD = errors.New("no such record") | ||
// ErrQueryNotSlicePointer return if result argument is not a pointer to a slice | ||
ErrQueryNotSlicePointer = errors.New("result argument must be a pointer to a slice") | ||
// ErrQueryNotSliceType return if result argument is not slice address | ||
ErrQueryNotSliceType = errors.New("result argument must be a slice address") | ||
// ErrQueryResultTypeInconsistent return if result type is not equal mongodb value type | ||
ErrQueryResultTypeInconsistent = errors.New("result type is not equal mongodb value type") | ||
// ErrQueryResultValCanNotChange return if the value of result can not be changed | ||
ErrQueryResultValCanNotChange = errors.New("the value of result can not be changed") | ||
// ErrNoSuchDocuments return if no document found | ||
ErrNoSuchDocuments = errors.New(mongo.ErrNoDocuments.Error()) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters