golang 소스 분석
https://medium.com/@pkbhowmick007/user-registration-and-login-template-using-golang-mongodb-and-jwt-d85f09f1295e
go get -v 설치할 패키지
에러:
{
"resource": "/g:/byoungguk_github/Angular_Go/themeforest-Ob3hLQlM-fuse-angularjs-material-design-admin-template/main.go",
"owner": "go-vet",
"severity": 4,
"message": "the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak",
"source": "go-vet",
"startLineNumber": 53,
"startColumn": 6,
"endLineNumber": 53,
"endColumn": 68
}
By calling, not discarding the cancel
function, as documented:
context, cancel := context.WithTimeout(context.Background(), ForceShutdownAfter*time.Second)
defer cancel()
참고: https://stackoverflow.com/questions/57155776/go-vet-warning-about-ignoring-context-cancel-function