Skip to content

feat: add support for toml config#8

Merged
dhth merged 4 commits intomainfrom
add-support-for-toml-config
Jul 19, 2024
Merged

feat: add support for toml config#8
dhth merged 4 commits intomainfrom
add-support-for-toml-config

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
@dhth dhth deleted the add-support-for-toml-config branch July 19, 2024 09:20

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