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: config read from filename #403

Merged
merged 1 commit into from
Jun 16, 2022
Merged

fix: config read from filename #403

merged 1 commit into from
Jun 16, 2022

Conversation

deryrahman
Copy link
Member

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2458993948

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 77.126%

Totals Coverage Status
Change from base Build 2452027336: 0.02%
Covered Lines: 7121
Relevant Lines: 9233

💛 - Coveralls

DefaultFilename = "optimus"
DefaultConfigFilename = "config" // default file name for server config
DefaultFilename = "optimus.yaml"
DefaultConfigFilename = "config.yaml" // default file name for server config
DefaultFileExtension = "yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the significance of the defaultfileextension then.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just checked that,DefaultFileExtension is used to define the type of parser.

For example, we have config yaml config file, but the name is optimus.custom. So we can use yaml parser to parse file optimus.custom

DefaultFilename       = "optimus.custom"
DefaultFileExtension  = "yaml"

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm the salt config says filename without extension and it was working without file extension as well. but only when both file name with and without extension present it is loading the file without extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I think what it says is different with the source code here, hence there's a mismatch

@deryrahman deryrahman merged commit 7b1198b into main Jun 16, 2022
@deryrahman deryrahman deleted the fix-config-reading branch June 16, 2022 06:53
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.

3 participants