adam-hanna / sessions Goto Github PK
View Code? Open in Web Editor NEWA dead simple, highly performant, highly customizable sessions middleware for go http servers.
License: MIT License
A dead simple, highly performant, highly customizable sessions middleware for go http servers.
License: MIT License
The problem is that it's difficult to know if an option type of int or bool was never initialized, or was initialized to its default value.
Possibly use strings?
Code should not return a custom err. Rather, to distinguish between a 401 and 500, the session service functions should return a nil pointer to a user session if none is present or valid, thus triggering a http 401 status code.
dep
are you using (dep version
)?go: go1.9.1 linux/amd64
dep: v0.3.2-4-g7b5c43aa
git: 2.14.2
dep
command did you run?# dep ensure -v
Root project is "github.com/my/repo"
8 transitively valid internal packages
23 external packages imported from 16 projects
(0) ✓ select (root)
...
(4) ? attempt github.com/NYTimes/logrotate with 1 pkgs; at least 1 versions to try
(4) try github.com/NYTimes/logrotate@master
(4) ✓ select github.com/NYTimes/logrotate@master w/1 pkgs
(5) ? attempt github.com/aymerick/raymond with 1 pkgs; at least 1 versions to try
(5) try github.com/aymerick/[email protected]
(5) ✓ select github.com/aymerick/[email protected] w/4 pkgs
(6) ? attempt github.com/adam-hanna/sessions with 5 pkgs; at least 1 versions to try
(6) try github.com/adam-hanna/[email protected]
(6) ✗ unexpected error while defensively updating submodules: : command failed: [git submodule update --init --recursive]: exit status 128
(6) try github.com/adam-hanna/[email protected]
(7) ✗ github.com/adam-hanna/[email protected] not allowed by constraint ^0.0.2:
(7) ^0.0.2 from (root)
(6) try github.com/adam-hanna/sessions@master
(7) ✗ github.com/adam-hanna/sessions@master not allowed by constraint ^0.0.2:
(7) ^0.0.2 from (root)
(6) try github.com/adam-hanna/sessions@develop
(7) ✗ github.com/adam-hanna/sessions@develop not allowed by constraint ^0.0.2:
(7) ^0.0.2 from (root)
(6) ← no more versions of github.com/adam-hanna/sessions to try; begin backtrack
(5) ← backtrack: no more versions of github.com/aymerick/raymond to try
(4) ← backtrack: no more versions of github.com/NYTimes/logrotate to try
...
✗ solving failed
Solver wall times by segment:
b-source-exists: 3.913478065s
b-list-pkgs: 1.286524935s
b-gmal: 218.790765ms
satisfy: 1.505631ms
new-atom: 1.238137ms
backtrack: 1.062701ms
select-root: 909.949µs
select-atom: 643.78µs
unselect: 335.459µs
b-deduce-proj-root: 89.125µs
b-pair-rev: 85.236µs
b-list-versions: 23.727µs
b-matches: 15.354µs
other: 9.864µs
TOTAL: 5.424712728s
ensure Solve(): No versions of github.com/adam-hanna/sessions met constraints:
v0.0.2: unexpected error while defensively updating submodules: : command failed: [git submodule update --init --recursive]: exit status 128
v0.0.1: Could not introduce github.com/adam-hanna/[email protected], as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.
master: Could not introduce github.com/adam-hanna/sessions@master, as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.
develop: Could not introduce github.com/adam-hanna/sessions@develop, as it is not allowed by constraint ^0.0.2 from project github.com/my/repo.
Working vendor checkout.
The reason is missing .gitmodules
.
After cloning your repo by hand and executing git submodule update --init --recursive
you get:
# git submodule update --init --recursive
fatal: No url found for submodule path 'vendor/github.com/pborman/uuid' in .gitmodules
# echo $?
128
Is there any reason for skipping .gitmodules
?
Or possibly the new user func?
Line 44 in cf0bbdb
The New
function should return an error and ping the store.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.