mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Update samples import paths
This commit is contained in:
@@ -25,7 +25,7 @@ type SourceInfo struct {
|
||||
StructSpecs []*TypeInfo
|
||||
// ValidationKeys provides a two-level lookup. The keys are:
|
||||
// 1. The fully-qualified function name,
|
||||
// e.g. "github.com/revel/revel/samples/chat/app/controllers.(*Application).Action"
|
||||
// e.g. "github.com/revel/samples/chat/app/controllers.(*Application).Action"
|
||||
// 2. Within that func's file, the line number of the (overall) expression statement.
|
||||
// e.g. the line returned from runtime.Caller()
|
||||
// The result of the lookup the name of variable being validated.
|
||||
@@ -44,7 +44,7 @@ type SourceInfo struct {
|
||||
// TypeInfo summarizes information about a struct type in the app source code.
|
||||
type TypeInfo struct {
|
||||
StructName string // e.g. "Application"
|
||||
ImportPath string // e.g. "github.com/revel/revel/samples/chat/app/controllers"
|
||||
ImportPath string // e.g. "github.com/revel/samples/chat/app/controllers"
|
||||
PackageName string // e.g. "controllers"
|
||||
MethodSpecs []*MethodSpec
|
||||
|
||||
|
||||
@@ -139,13 +139,13 @@ func TestTypeExpr(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestProcessBookingSource(t *testing.T) {
|
||||
revel.Init("prod", "github.com/revel/revel/samples/booking", "")
|
||||
revel.Init("prod", "github.com/revel/samples/booking", "")
|
||||
sourceInfo, err := ProcessSource([]string{revel.AppPath})
|
||||
if err != nil {
|
||||
t.Fatal("Failed to process booking source with error:", err)
|
||||
}
|
||||
|
||||
CONTROLLER_PKG := "github.com/revel/revel/samples/booking/app/controllers"
|
||||
CONTROLLER_PKG := "github.com/revel/samples/booking/app/controllers"
|
||||
expectedControllerSpecs := []*TypeInfo{
|
||||
{"GorpController", CONTROLLER_PKG, "controllers", nil, nil},
|
||||
{"Application", CONTROLLER_PKG, "controllers", nil, nil},
|
||||
@@ -177,7 +177,7 @@ NEXT_TEST:
|
||||
}
|
||||
|
||||
func BenchmarkProcessBookingSource(b *testing.B) {
|
||||
revel.Init("", "github.com/revel/revel/samples/booking", "")
|
||||
revel.Init("", "github.com/revel/samples/booking", "")
|
||||
revel.TRACE = log.New(ioutil.Discard, "", 0)
|
||||
b.ResetTimer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user