Skip to content

Commit 5d9e48e

Browse files
committed
Improvement and golint taken care for version
1 parent 9e08cbf commit 5d9e48e

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

i18n.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func loadMessages(path string) {
107107
// Read in messages from the modules. Load the module messges first,
108108
// so that it can be override in parent application
109109
for _, module := range Modules {
110-
TRACE.Println("Importing messages from ", filepath.Join(module.Path, messageFilesDirectory))
110+
TRACE.Println("Importing messages from module:", module.ImportPath)
111111
if err := Walk(filepath.Join(module.Path, messageFilesDirectory), loadMessageFile); err != nil &&
112112
!os.IsNotExist(err) {
113113
ERROR.Println("Error reading messages files from module:", err)

revel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func Init(mode, importPath, srcPath string) {
215215
loadModules()
216216

217217
Initialized = true
218-
INFO.Printf("Initialized Revel v%s (%s) for %s", VERSION, BUILD_DATE, MINIMUM_GO)
218+
INFO.Printf("Initialized Revel v%s (%s) for %s", Version, BuildDate, MinimumGoVersion)
219219
}
220220

221221
// Create a logger using log.* directives in app.conf plus the current settings

util.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func ClientIP(r *http.Request) string {
212212
// Walk method extends filepath.Walk to also follow symlinks.
213213
// Always returns the path of the file or directory.
214214
func Walk(root string, walkFn filepath.WalkFunc) error {
215-
return fsWalk(root, root, root, walkFn)
215+
return fsWalk(root, root, walkFn)
216216
}
217217

218218
// createDir method creates nested directories if not exists
@@ -229,19 +229,19 @@ func createDir(path string) error {
229229
return nil
230230
}
231231

232-
func fsWalk(path string, dirName string, linkDirName string, walkFn filepath.WalkFunc) error {
232+
func fsWalk(fname string, linkName string, walkFn filepath.WalkFunc) error {
233233
fsWalkFunc := func(path string, info os.FileInfo, err error) error {
234234
if err != nil {
235235
return err
236236
}
237237

238238
var name string
239-
name, err = filepath.Rel(dirName, path)
239+
name, err = filepath.Rel(fname, path)
240240
if err != nil {
241241
return err
242242
}
243243

244-
path = filepath.Join(linkDirName, name)
244+
path = filepath.Join(linkName, name)
245245

246246
if err == nil && info.Mode()&os.ModeSymlink == os.ModeSymlink {
247247
var symlinkPath string
@@ -257,14 +257,14 @@ func fsWalk(path string, dirName string, linkDirName string, walkFn filepath.Wal
257257
}
258258

259259
if info.IsDir() {
260-
return fsWalk(symlinkPath, symlinkPath, path, walkFn)
260+
return fsWalk(symlinkPath, path, walkFn)
261261
}
262262
}
263263

264264
return walkFn(path, info, err)
265265
}
266266

267-
return filepath.Walk(path, fsWalkFunc)
267+
return filepath.Walk(fname, fsWalkFunc)
268268
}
269269

270270
func init() {

version.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package revel
22

33
const (
44
// Current Revel version
5-
VERSION = "0.13.0-dev"
5+
Version = "0.13.0-dev"
6+
67
// Latest commit date
7-
BUILD_DATE = "TBD"
8+
BuildDate = "TBD"
9+
810
// Minimum required Go version
9-
MINIMUM_GO = ">= go1.4"
11+
MinimumGoVersion = ">= go1.4"
1012
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy