mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-22 21:04:41 +08:00
Use Go1.11 module (#5743)
* Migrate to go modules * make vendor * Update mvdan.cc/xurls * make vendor * Update code.gitea.io/git * make fmt-check * Update github.com/go-sql-driver/mysql * make vendor
This commit is contained in:
CONTRIBUTING.mdGopkg.lockGopkg.tomlMakefilego.modgo.summodules.txt
modules/markup
vendor
github.com
BurntSushi/toml
PuerkitoBio/goquery
RoaringBitmap/roaring
Unknwon
cae
com
i18n
paginater
andybalholm/cascadia
beorn7/perks/quantile
blevesearch
boombuler/barcode
chaseadamsio/goorgeous
couchbase
couchbaselabs/go-couchbase
davecgh/go-spew
denisenkom/go-mssqldb
dgrijalva/jwt-go
edsrzf/mmap-go
elazarl/go-bindata-assetfs
etcd-io/bbolt
ethantkoenig/rupture
facebookgo
glycerine/go-unsnap-stream
go-macaron
bindata
binding
cache
captcha
csrf
i18n
inject
session
toolbox
go-sql-driver/mysql
go-xorm
builder
core
xorm
gogits
golang/snappy
.gitignoreREADMEdecode.godecode_amd64.godecode_amd64.sdecode_other.goencode.goencode_amd64.goencode_amd64.sencode_other.gosnappy.go
gorilla
context
mux
securecookie
sessions
issue9/identicon
jaytaylor/html2text
kballard/go-shellquote
kevinburke/ssh_config
keybase/go-crypto/openpgp
klauspost
compress/snappy
cpuid
crc32
lafriks/xormstore
lib/pq
.gitignore.travis.sh.travis.ymlCONTRIBUTING.mdREADME.mdTESTS.mdconn.goconn_go18.goconnector.godoc.goerror.gogo.modnotify.gossl.go
lunny
dingtalk_webhook
levelqueue
log
nodb
markbates/goth
mattn/go-sqlite3
matttproud/golang_protobuf_extensions/pbutil
mcuadros/go-version
microcosm-cc/bluemonday
mitchellh/go-homedir
mrjones/oauth
mschoch/smat
msteinert/pam
nfnt/resize
pelletier/go-buffruneio
philhofer/fwd
pkg/errors
pquerna/otp
prometheus
client_golang/prometheus
client_model/ruby
common/internal/bitbucket.org/ww/goautoneg
procfs
russross/blackfriday
satori/go.uuid
sergi/go-diff
shurcooL/sanitized_anchor_name
src-d/gcfg
steveyen/gtreap
stretchr/testify
assert
assertion_format.goassertion_format.go.tmplassertion_forward.goassertion_forward.go.tmplassertions.gohttp_assertions.go
require
tstranex/u2f
urfave/cli
willf/bitset
xanzy/ssh-agent
yohcop/openid-go
golang.org/x
crypto
acme
ed25519
internal
chacha20
subtle
openpgp
poly1305
ssh
oauth2
sys/unix
.gitignoreREADME.mdmkall.shmkerrors.shmksyscall.plmksyscall_aix_ppc.plmksyscall_aix_ppc64.plmksyscall_solaris.plmksysctl_openbsd.plmksysnum_darwin.plmksysnum_dragonfly.plmksysnum_freebsd.plmksysnum_netbsd.plmksysnum_openbsd.pl
text
encoding/htmlindex
internal
language
unicode
google.golang.org/appengine
LICENSE
cloudsql
internal
api.goapi_classic.goapi_common.goapi_pre17.goapp_id.go
base
datastore
identity.goidentity_classic.goidentity_vm.gointernal.golog
main.gomain_vm.gometadata.gonet.goregen.shremote_api
transaction.gourlfetch
urlfetch
gopkg.in
alexcesaro/quotedprintable.v3
asn1-ber.v1
bufio.v1
editorconfig/editorconfig-core-go.v1
gomail.v2
ini.v1
ldap.v3
macaron.v1
redis.v2
src-d
go-billy.v4
go-git.v4
testfixtures.v2
warnings.v0
yaml.v2
mvdan.cc/xurls/v2
strk.kbt.io/projects/go/libravatar
5
vendor/github.com/gorilla/sessions/doc.go
generated
vendored
5
vendor/github.com/gorilla/sessions/doc.go
generated
vendored
@ -29,8 +29,7 @@ Let's start with an example that shows the sessions API in a nutshell:
|
||||
var store = sessions.NewCookieStore([]byte("something-very-secret"))
|
||||
|
||||
func MyHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Get a session. We're ignoring the error resulted from decoding an
|
||||
// existing session: Get() always returns a session, even if empty.
|
||||
// Get a session. Get() always returns a session, even if empty.
|
||||
session, err := store.Get(r, "session-name")
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
@ -80,7 +79,7 @@ flashes, call session.Flashes(). Here is an example:
|
||||
return
|
||||
}
|
||||
|
||||
// Get the previously flashes, if any.
|
||||
// Get the previous flashes, if any.
|
||||
if flashes := session.Flashes(); len(flashes) > 0 {
|
||||
// Use the flash values.
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user