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

feat: add GetConfiguration using yaml w/ test #118

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

zeroFruit
Copy link
Member

resolved: #117

details:

SWIM getting configuration logic with viper

  • Test case

Copy link
Member

@hea9549 hea9549 left a comment

Choose a reason for hiding this comment

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

How about putting a delay option before sending a message?
This can be used in many ways when creating testing tools.


// case ~/
if strings.Contains(rpath, "~") {
i := strings.Index(rpath, "~") // 처음 나온 ~만 반환
Copy link
Member

Choose a reason for hiding this comment

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

plz comment using english :)

Copy link
Member

Choose a reason for hiding this comment

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

strings package has HasPrefix function

detail explain is in upper comment

Copy link
Member

Choose a reason for hiding this comment

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

oops. not upper but lower

absolutePath := ""

// case ./ ../
if strings.Contains(rpath, "./") {
Copy link
Member

Choose a reason for hiding this comment

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

strings package has HasPrefix function

you can use string.HasPrefix(rpath,"./") | string.HasPrefix(rpath,"../")

it can prevent path like ..../a/b/c or like /a/b/./c

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.

[conf] GetConfiguration using viper
2 participants