Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dont reset to false #2965

Merged
merged 2 commits into from
Dec 18, 2022
Merged

fix: dont reset to false #2965

merged 2 commits into from
Dec 18, 2022

Conversation

CaptainStandby
Copy link
Contributor

@CaptainStandby CaptainStandby commented Dec 17, 2022

Addendum to #2964

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

aeneasr
aeneasr previously approved these changes Dec 17, 2022
@codecov
Copy link

codecov bot commented Dec 17, 2022

Codecov Report

Merging #2965 (88cf3e4) into master (7248636) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2965   +/-   ##
=======================================
  Coverage   76.16%   76.16%           
=======================================
  Files         309      309           
  Lines       19046    19046           
=======================================
  Hits        14507    14507           
  Misses       3414     3414           
  Partials     1125     1125           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! By the way, you could probably do something similar now with generics a la

import (
	"github.com/samber/lo"
	"strings"
)


		_, found := lo.Find(hook.AllEntries(), func(i HookType) bool {
			s, err := v.String()
			require.NoErrorf(t, err, "Unexpected Error")
			return strings.Contains(s, "The changed identity schema configuration is invalid and could not be loaded.")
		})

		// ...

		default: //nothing
			if found {
				break
			}
		}

although they way you wrote it here is more Go-esque than that (and doesn't need a library). Just an alternative way to express this

driver/config/config_test.go Outdated Show resolved Hide resolved
CaptainStandby and others added 2 commits December 17, 2022 16:50
Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
@aeneasr aeneasr merged commit ae8ad7b into master Dec 18, 2022
@aeneasr aeneasr deleted the hf-fix-build-v2 branch December 18, 2022 12:12
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants