Skip to content

Commit

Permalink
Merge branch 'develop' into lint
Browse files Browse the repository at this point in the history
  • Loading branch information
notzippy committed Mar 6, 2022
2 parents a6221ae + d202b93 commit 0fcd829
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
11 changes: 6 additions & 5 deletions README.md
@@ -1,10 +1,10 @@
# Revel Framework

[![Build Status](https://secure.travis-ci.org/revel/revel.svg?branch=master)](http://travis-ci.org/revel/revel)
[![Build Status](https://secure.travis-ci.org/revel/revel.svg?branch=master)](https://travis-ci.org/revel/revel)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/revel/revel)](https://goreportcard.com/report/github.com/revel/revel)

A high productivity, full-stack web framework for the [Go language](http://www.golang.org).
A high productivity, full-stack web framework for the [Go language](https://www.golang.org).

Current Version: 1.1.0-dev (2020-07-11)

Expand All @@ -14,7 +14,8 @@ Current Version: 1.1.0-dev (2020-07-11)

Install Revel:

go get -u github.com/revel/cmd/revel
go install github.com/revel/cmd/revel@latest


Create & Run your app:

Expand All @@ -26,12 +27,12 @@ Open http://localhost:9000 in your browser and you should see "It works!"
## Community

* [Gitter](https://gitter.im/revel/community)
* [StackOverflow](http://stackoverflow.com/questions/tagged/revel)
* [StackOverflow](https://stackoverflow.com/questions/tagged/revel)


## Learn More

* [Manual, Samples, Godocs, etc](http://revel.github.io)
* [Manual, Samples, Godocs, etc](https://revel.github.io)
* [Apps using Revel](https://github.com/revel/revel/wiki/Apps-in-the-Wild)
* [Articles Featuring Revel](https://github.com/revel/revel/wiki/Articles)

Expand Down
2 changes: 1 addition & 1 deletion binder.go
Expand Up @@ -162,7 +162,7 @@ var (
return v.Addr()
}

return v
return reflect.Zero(typ)
},
Unbind: func(output map[string]string, name string, val interface{}) {
Unbind(output, name, reflect.ValueOf(val).Elem().Interface())
Expand Down
2 changes: 1 addition & 1 deletion cache/redis.go
Expand Up @@ -7,7 +7,7 @@ package cache
import (
"time"

"github.com/garyburd/redigo/redis"
"github.com/gomodule/redigo/redis"
"github.com/revel/revel"
)

Expand Down
1 change: 1 addition & 0 deletions compress.go
Expand Up @@ -20,6 +20,7 @@ var compressionTypes = [...]string{

var compressableMimes = [...]string{
"text/plain",
"text/csv",
"text/html",
"text/xml",
"text/css",
Expand Down
3 changes: 2 additions & 1 deletion server_adapter_go.go
Expand Up @@ -13,6 +13,7 @@ import (
"sort"
"strconv"
"strings"
"syscall"
"time"

"github.com/revel/revel/utils"
Expand Down Expand Up @@ -216,7 +217,7 @@ func (g *GoHttpServer) Engine() interface{} {
func (g *GoHttpServer) Event(event Event, args interface{}) (r EventResponse) {
switch event {
case ENGINE_STARTED:
signal.Notify(g.signalChan, os.Interrupt, os.Kill)
signal.Notify(g.signalChan, os.Interrupt, syscall.SIGTERM, os.Kill)
go func() {
<-g.signalChan
serverLogger.Info("Received quit singal Please wait ... ")
Expand Down
8 changes: 4 additions & 4 deletions session/session.go
Expand Up @@ -7,12 +7,12 @@ package session
import (
"encoding/hex"
"encoding/json"
"errors"
"github.com/google/uuid"
"reflect"
"strconv"
"strings"
"time"

"github.com/twinj/uuid"
)

const (
Expand Down Expand Up @@ -61,9 +61,9 @@ func (s Session) ID() string {
return sessionIDStr.(string)
}

buffer := uuid.NewV4()
suuid := uuid.New()

s[SessionIDKey] = hex.EncodeToString(buffer.Bytes())
s[SessionIDKey] = hex.EncodeToString(suuid[0:])
return s[SessionIDKey].(string)
}

Expand Down
10 changes: 5 additions & 5 deletions validators.go
Expand Up @@ -349,7 +349,7 @@ func (i IPAddr) IsSatisfied(obj interface{}) bool {
}

func (i IPAddr) DefaultMessage() string {
return fmt.Sprintln("Must be a vaild IP address")
return fmt.Sprintln("Must be a valid IP address")
}

// Requires a MAC Address string to be exactly.
Expand All @@ -370,7 +370,7 @@ func (m MacAddr) IsSatisfied(obj interface{}) bool {
}

func (m MacAddr) DefaultMessage() string {
return fmt.Sprintln("Must be a vaild MAC address")
return fmt.Sprintln("Must be a valid MAC address")
}

var domainPattern = regexp.MustCompile(`^(([a-zA-Z0-9-\p{L}]{1,63}\.)?(xn--)?[a-zA-Z0-9\p{L}]+(-[a-zA-Z0-9\p{L}]+)*\.)+[a-zA-Z\p{L}]{2,63}$`)
Expand Down Expand Up @@ -404,7 +404,7 @@ func (d Domain) IsSatisfied(obj interface{}) bool {
}

func (d Domain) DefaultMessage() string {
return fmt.Sprintln("Must be a vaild domain address")
return fmt.Sprintln("Must be a valid domain address")
}

var urlPattern = regexp.MustCompile(`^((((https?|ftps?|gopher|telnet|nntp)://)|(mailto:|news:))(%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@#&=+$,A-Za-z0-9\p{L}])+)([).!';/?:,][[:blank:]])?$`)
Expand All @@ -427,7 +427,7 @@ func (u URL) IsSatisfied(obj interface{}) bool {
}

func (u URL) DefaultMessage() string {
return fmt.Sprintln("Must be a vaild URL address")
return fmt.Sprintln("Must be a valid URL address")
}

/*
Expand Down Expand Up @@ -559,7 +559,7 @@ func (p PureText) IsSatisfied(obj interface{}) bool {
}

func (p PureText) DefaultMessage() string {
return fmt.Sprintln("Must be a vaild Text")
return fmt.Sprintln("Must be a valid Text")
}

const (
Expand Down

0 comments on commit 0fcd829

Please sign in to comment.