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 support for toml config #8

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Conversation

dhth
Copy link
Owner

@dhth dhth commented Jul 17, 2024

Adds support for providing config via a TOML file.

@dhth dhth marked this pull request as ready for review July 18, 2024 16:02
@dhth dhth merged commit 8d2e169 into main Jul 19, 2024
2 checks passed
@dhth dhth deleted the add-support-for-toml-config branch July 19, 2024 09:20
@@ -59,38 +60,43 @@ Error: %s`,
}

if latestVersionInDB.version > latestDBVersion {
die(`Looks like you downgraded omm. You should either delete omm's
return fmt.Errorf(`Looks like you downgraded omm. You should either delete omm's

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf(`Looks like you downgraded omm. You should either delete omm's
return errors.New(`Looks like you downgraded omm. You should either delete omm's

You are not formating here

Comment on lines +28 to +31
defaultConfigDir = ".config"
defaultDataDir = ".local/share"
defaultConfigDirWindows = "AppData/Roaming"
defaultDataDirWindows = "AppData/Local"

Choose a reason for hiding this comment

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

Please consider using

os.UserConfigDir

UserCacheDir

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good tip!
I'll change this.

@ccoVeille
Copy link

Oh I posted my review after you merged. I started in 20 min ago 😒

@dhth

@dhth
Copy link
Owner Author

dhth commented Jul 19, 2024

@ccoVeille Thanks for the review :)
I'll incorporate the changes.

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.

2 participants