profile
viewpoint
Alexander Morozov LK4D4 @dropbox Walnut Creek, CA http://lk4d4.darth.io I like to help people.

Pull request review commentgrafana/grafana

Chore: Fix statichcheck errors

 func NewOAuthService() { 	for _, name := range allOauthes { 		sec := setting.Raw.Section("auth." + name) 		info := &setting.OAuthInfo{-			ClientId:                     sec.Key("client_id").String(),-			ClientSecret:                 sec.Key("client_secret").String(),-			Scopes:                       util.SplitString(sec.Key("scopes").String()),-			AuthUrl:                      sec.Key("auth_url").String(),-			TokenUrl:                     sec.Key("token_url").String(),-			ApiUrl:                       sec.Key("api_url").String(),-			Enabled:                      sec.Key("enabled").MustBool(),-			EmailAttributeName:           sec.Key("email_attribute_name").String(),-			EmailAttributePath:           sec.Key("email_attribute_path").String(),-			AllowedDomains:               util.SplitString(sec.Key("allowed_domains").String()),-			HostedDomain:                 sec.Key("hosted_domain").String(),-			AllowSignup:                  sec.Key("allow_sign_up").MustBool(),-			Name:                         sec.Key("name").MustString(name),-			TlsClientCert:                sec.Key("tls_client_cert").String(),-			TlsClientKey:                 sec.Key("tls_client_key").String(),-			TlsClientCa:                  sec.Key("tls_client_ca").String(),-			TlsSkipVerify:                sec.Key("tls_skip_verify_insecure").MustBool(),+			ClientId:           sec.Key("client_id").String(),+			ClientSecret:       sec.Key("client_secret").String(),+			Scopes:             util.SplitString(sec.Key("scopes").String()),+			AuthUrl:            sec.Key("auth_url").String(),+			TokenUrl:           sec.Key("token_url").String(),+			ApiUrl:             sec.Key("api_url").String(),+			Enabled:            sec.Key("enabled").MustBool(),+			EmailAttributeName: sec.Key("email_attribute_name").String(),+			EmailAttributePath: sec.Key("email_attribute_path").String(),+			AllowedDomains:     util.SplitString(sec.Key("allowed_domains").String()),+			HostedDomain:       sec.Key("hosted_domain").String(),+			AllowSignup:        sec.Key("allow_sign_up").MustBool(),+			Name:               sec.Key("name").MustString(name),+			TlsClientCert:      sec.Key("tls_client_cert").String(),+			TlsClientKey:       sec.Key("tls_client_key").String(),+			TlsClientCa:        sec.Key("tls_client_ca").String(),+			TlsSkipVerify:      sec.Key("tls_skip_verify_insecure").MustBool(),+			// TODO: Deprecate send_client_credentials_via_post as auth style is autodetected 			SendClientCredentialsViaPost: sec.Key("send_client_credentials_via_post").MustBool(), 		}  		if !info.Enabled { 			continue 		} -		// handle the clients that do not properly support Basic auth headers and require passing client_id/client_secret via POST payload-		if info.SendClientCredentialsViaPost {-			// TODO: Fix the staticcheck error-			oauth2.RegisterBrokenAuthHeaderProvider(info.TokenUrl) //nolint:staticcheck-		}-

This method was deprecated and does nothing. https://godoc.org/golang.org/x/oauth2#RegisterBrokenAuthHeaderProvider

LK4D4

comment created time in 17 days

Pull request review commentgrafana/grafana

Chore: Fix statichcheck errors

 func NewOAuthService() { 	for _, name := range allOauthes { 		sec := setting.Raw.Section("auth." + name) 		info := &setting.OAuthInfo{-			ClientId:                     sec.Key("client_id").String(),-			ClientSecret:                 sec.Key("client_secret").String(),-			Scopes:                       util.SplitString(sec.Key("scopes").String()),-			AuthUrl:                      sec.Key("auth_url").String(),-			TokenUrl:                     sec.Key("token_url").String(),-			ApiUrl:                       sec.Key("api_url").String(),-			Enabled:                      sec.Key("enabled").MustBool(),-			EmailAttributeName:           sec.Key("email_attribute_name").String(),-			EmailAttributePath:           sec.Key("email_attribute_path").String(),-			AllowedDomains:               util.SplitString(sec.Key("allowed_domains").String()),-			HostedDomain:                 sec.Key("hosted_domain").String(),-			AllowSignup:                  sec.Key("allow_sign_up").MustBool(),-			Name:                         sec.Key("name").MustString(name),-			TlsClientCert:                sec.Key("tls_client_cert").String(),-			TlsClientKey:                 sec.Key("tls_client_key").String(),-			TlsClientCa:                  sec.Key("tls_client_ca").String(),-			TlsSkipVerify:                sec.Key("tls_skip_verify_insecure").MustBool(),+			ClientId:           sec.Key("client_id").String(),+			ClientSecret:       sec.Key("client_secret").String(),+			Scopes:             util.SplitString(sec.Key("scopes").String()),+			AuthUrl:            sec.Key("auth_url").String(),+			TokenUrl:           sec.Key("token_url").String(),+			ApiUrl:             sec.Key("api_url").String(),+			Enabled:            sec.Key("enabled").MustBool(),+			EmailAttributeName: sec.Key("email_attribute_name").String(),+			EmailAttributePath: sec.Key("email_attribute_path").String(),+			AllowedDomains:     util.SplitString(sec.Key("allowed_domains").String()),+			HostedDomain:       sec.Key("hosted_domain").String(),+			AllowSignup:        sec.Key("allow_sign_up").MustBool(),+			Name:               sec.Key("name").MustString(name),+			TlsClientCert:      sec.Key("tls_client_cert").String(),+			TlsClientKey:       sec.Key("tls_client_key").String(),+			TlsClientCa:        sec.Key("tls_client_ca").String(),+			TlsSkipVerify:      sec.Key("tls_skip_verify_insecure").MustBool(),+			// TODO: Deprecate send_client_credentials_via_post as auth style is autodetected

I added comment and gofmt reformated structure initialization

LK4D4

comment created time in 17 days

Pull request review commentmattermost/mattermost-server

Replace time.After with time.NewTimer

 func (schedulers *Schedulers) Start() *Schedulers { 			}  			for {+				timer := time.NewTimer(1 * time.Minute) 				select { 				case <-schedulers.stop: 					mlog.Debug("Schedulers received stop signal.") 					return

Idea with Reset is nice, but requires some refactoring IMO to be readable. It could be another PR, this for loop looks already very big and should be moved into function or something :) Just stopped timer on exit for now.

LK4D4

comment created time in 23 days

push eventLK4D4/mattermost-server

Alexander Morozov

commit sha 8e796bd1bb1cb3cda5f8d63e66e52e5937592d27

Replace time.After with time.NewTimer time.After might leave stray timers if other channels in select triggered early Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

push time in 23 days

push eventLK4D4/vndr

Elena Morozova

commit sha d87a91749c025d1154ae4ebbf228226c7d5423a7

Replace sort.Sort with sort.Strings Fix staticcheck issue

view details

push time in 25 days

PR merged LK4D4/vndr

Replace sort.Sort with sort.Strings

Fix staticcheck issue

+1 -1

0 comment

1 changed file

lelenanam

pr closed time in 25 days

push eventLK4D4/websocketd

Alexander Morozov

commit sha 9032271d6fbfe6997e13df526c460280509e5e5c

Fix some simple issues found by staticcheck

view details

push time in 25 days

create barnchLK4D4/websocketd

branch : fix_staticcheck

created branch time in 25 days

push eventLK4D4/trylock

Elena Morozova

commit sha 28a981d4992ed48425123a1ee409d0e8f107ed2b

Update go version in travis

view details

Alexander Morozov

commit sha ff7e133a5c547a37bd19dd10ca14de8fe5e9406a

Merge pull request #2 from lelenanam/travis Update go version in travis

view details

push time in 25 days

PR merged LK4D4/trylock

Update go version in travis
+3 -3

0 comment

1 changed file

lelenanam

pr closed time in 25 days

fork LK4D4/websocketd

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.

http://websocketd.com/

fork in 25 days

push eventlelenanam/vndr

Alexander Morozov

commit sha 167c2c5f2e13ada191e19fa3034203367e05beda

Update go versions for travis Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

Alexander Morozov

commit sha 5b7bb0c9d5d10085a8bcf42cc80bf1c7208521c4

Merge branch 'master' into sort

view details

push time in 25 days

delete branch LK4D4/vndr

delete branch : update_go_versions

delete time in 25 days

push eventLK4D4/vndr

Alexander Morozov

commit sha 167c2c5f2e13ada191e19fa3034203367e05beda

Update go versions for travis Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

push time in 25 days

PR merged LK4D4/vndr

Update go versions for travis
+1 -2

0 comment

1 changed file

LK4D4

pr closed time in 25 days

push eventLK4D4/vndr

Alexander Morozov

commit sha 10057bdde595bfb8d7d2424cd87e3ba86176fa7b

Update go versions for travis Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

push time in 25 days

PR opened LK4D4/vndr

Update go versions for travis
+1 -2

0 comment

1 changed file

pr created time in 25 days

create barnchLK4D4/vndr

branch : update_go_versions

created branch time in 25 days

push eventLK4D4/mattermost-server

Alexander Morozov

commit sha fd2c722a2e2bc4f7517e03584ed473bd19cb8647

Replace time.After with time.NewTimer time.After might leave stray timers if other channels in select triggered early Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

push time in 25 days

PR opened mattermost/mattermost-server

Replace time.After with time.NewTimer

<!-- Thank you for contributing a pull request! Here are a few tips to help you:

  1. If this is your first contribution, make sure you've read the Contribution Checklist https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
  2. Read our blog post about "Submitting Great PRs" https://developers.mattermost.com/blog/2019-01-24-submitting-great-prs
  3. Take a look at other repository specific documentation at https://developers.mattermost.com/contribute -->

Summary

time.After might leave stray timers if other channels in select triggered early

<!-- A description of what this pull request does. -->

<!-- If this pull request addresses a Help Wanted ticket, please link the relevant GitHub issue, e.g.

Fixes https://github.com/mattermost/mattermost-server/issues/XXXXX

Otherwise, link the JIRA ticket. -->

+3 -1

0 comment

1 changed file

pr created time in 25 days

create barnchLK4D4/mattermost-server

branch : replace_after

created branch time in 25 days

fork LK4D4/mattermost-server

Open source Slack-alternative in Golang and React - Mattermost

https://mattermost.com

fork in 25 days

PR opened grafana/grafana

Chore: Fix statichcheck errors

<!--

Thank you for sending a pull request! Here are some tips:

  1. If this is your first time, please read our contribution guide at https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md

  2. Ensure you include and run the appropriate tests as part of your Pull Request.

  3. In a new feature or configuration option, an update to the documentation is necessary. Everything related to the documentation is under the docs folder in the root of the repository.

  4. If the Pull Request is a work in progress, make use of GitHub's "Draft PR" feature and mark it as such.

  5. If you can not merge your Pull Request due to a merge conflict, Rebase it. This gets it in sync with the master branch.

  6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.

-->

What this PR does / why we need it: Fixes old staticcheck issues

Which issue(s) this PR fixes: Not entirely but #8968 <!--

  • Automatically closes linked issue when the Pull Request is merged.

Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"

-->

+20 -26

0 comment

2 changed files

pr created time in 25 days

push eventLK4D4/grafana

Alexander Morozov

commit sha 07f9cf78db0d661150daee9497a8c15de9e70f29

Chore: Fix statichcheck errors Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>

view details

push time in 25 days

create barnchLK4D4/grafana

branch : fix_staticcheck

created branch time in 25 days

fork LK4D4/grafana

The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More

https://grafana.com

fork in 25 days

GollumEvent

push eventLK4D4/dotfiles

Alexander Morozov

commit sha a8f4a8c86e4f7bc72b970c74736fdd80458e3bf6

[vim] migrate to coc

view details

push time in a month

fork LK4D4/ripgrep

ripgrep recursively searches directories for a regex pattern

fork in a month

startedmicrosoft/vscode

started time in 2 months

startedvesoft-inc/nebula

started time in 2 months

startednlohmann/json

started time in 2 months

startedaria2/aria2

started time in 2 months

issue commentLK4D4/vndr

https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone

@siddanmk https://github.com/LK4D4/vndr/releases/tag/v0.0.4

siddanmk

comment created time in 3 months

release LK4D4/vndr

v0.0.4

released time in 3 months

created tagLK4D4/vndr

tagv0.0.4

Stupid vendoring tool

created time in 3 months

delete branch LK4D4/vndr

delete branch : fix_bitbucket

delete time in 3 months

push eventLK4D4/vndr

Alexander Morozov

commit sha 146dcc384fdbbcbebaa2db86bf11755a15870dc7

migrate bitbucket to api 2.0 Fix #82 Signed-off-by: Alexander Morozov <lk4d4@dropbox.com>

view details

push time in 3 months

PR merged LK4D4/vndr

migrate bitbucket to api 2.0

Fix #82

+1 -1

0 comment

1 changed file

LK4D4

pr closed time in 3 months

issue closedLK4D4/vndr

https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone

When vndr command is run, I see this: https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone which is in https://github.com/LK4D4/vndr/blob/master/godl/vcs.go

Tried to open the page https://api.bitbucket.org/1.0/repositories/ww/goautoneg: {"type": "error", "error": {"message": "Resource removed", "detail": "This API is no longer supported.\n\nFor information about its removal, please refer to the deprecation notice at: https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/"}}

closed time in 3 months

siddanmk

issue commentLK4D4/vndr

https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone

@siddanmk thanks for the report. Will be fixed in #83 and I will tag new version

siddanmk

comment created time in 3 months

PR opened LK4D4/vndr

migrate bitbucket to api 2.0

Fix #82

+1 -1

0 comment

1 changed file

pr created time in 3 months

create barnchLK4D4/vndr

branch : fix_bitbucket

created branch time in 3 months

issue commentLK4D4/vndr

https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone

@siddanmk do you have bitbucket packages in your vendor.conf or is it just erroring out on any run?

siddanmk

comment created time in 3 months

more