mirror of
https://github.com/astaxie/beego.git
synced 2025-06-13 10:40:39 +00:00
Refactor orm filter
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,5 +17,4 @@ package bean
|
||||
// ApplicationContext define for future
|
||||
// when we decide to support DI, IoC, this will be core API
|
||||
type ApplicationContext interface {
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -22,4 +22,4 @@ import (
|
||||
type AutoWireBeanFactory interface {
|
||||
// AutoWire will wire the bean.
|
||||
AutoWire(ctx context.Context, appCtx ApplicationContext, bean interface{}) error
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,7 +17,6 @@ package bean
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
)
|
||||
|
||||
// TimeTypeAdapter process the time.Time
|
||||
@ -29,7 +28,7 @@ type TimeTypeAdapter struct {
|
||||
// and if the DftValue == now
|
||||
// time.Now() is returned
|
||||
func (t *TimeTypeAdapter) DefaultValue(ctx context.Context, dftValue string) (interface{}, error) {
|
||||
if dftValue == "now"{
|
||||
if dftValue == "now" {
|
||||
return time.Now(), nil
|
||||
}
|
||||
return time.Parse(t.Layout, dftValue)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020
|
||||
// Copyright 2020
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
Reference in New Issue
Block a user