add error handling for reading configuration #1

Merged
arya merged 9 commits from odyseusz/publapi:master into master 2024-11-04 20:20:30 +05:30
Contributor

I haven't tested it, but viper.ReadInConfig() returns error, so it should work. I think it's worth cleaning up the Userinfo struct thing that I'm doing, to respect the DRY principle.

I haven't tested it, but viper.ReadInConfig() returns ``error``, so it should work. I think it's worth cleaning up the Userinfo struct thing that I'm doing, to respect the DRY principle.
odyseusz added 1 commit 2024-09-28 21:54:57 +05:30
odyseusz added 1 commit 2024-09-28 23:21:39 +05:30
odyseusz added 1 commit 2024-09-28 23:42:08 +05:30
odyseusz added 1 commit 2024-09-28 23:51:00 +05:30
odyseusz added 1 commit 2024-09-29 00:21:06 +05:30
odyseusz requested review from midou 2024-09-29 14:50:28 +05:30
odyseusz requested review from arya 2024-09-29 14:50:29 +05:30
odyseusz added 1 commit 2024-09-29 16:00:09 +05:30
odyseusz added 1 commit 2024-09-29 18:05:43 +05:30
odyseusz added 1 commit 2024-10-06 19:54:59 +05:30
arya approved these changes 2024-10-06 20:58:53 +05:30
arya left a comment
Owner

Approved from my side, @midou please give it another glance before merging

Approved from my side, @midou please give it another glance before merging
midou requested changes 2024-10-06 21:09:00 +05:30
Dismissed
midou left a comment
Owner

LGTM except this

LGTM except this
README.md Outdated
@ -7,3 +7,3 @@
## Install
An installation of Go 1.19 or higher is required.
An installation of Go 1.21+ is required.
Owner

1.21 but the requirement in go.mod is 1.22, does it really work in 1.21 or 1.22 is really required?

1.21 but the requirement in go.mod is 1.22, does it *really* work in 1.21 or 1.22 is really required?
Author
Contributor

Go extension for Visual Studio Code changed it to 1.22 automatically when I asked it to clear out unneeded dependencies, but no, 1.21+ should work.

Go extension for Visual Studio Code changed it to 1.22 automatically when I asked it to clear out unneeded dependencies, but no, 1.21+ should work.
odyseusz added 1 commit 2024-10-10 00:54:40 +05:30
midou approved these changes 2024-11-04 04:00:39 +05:30
Owner

@arya i'll let you the honor of merging (i'll blame you if it breaks)

@arya i'll let you the honor of merging ~~(i'll blame you if it breaks)~~
arya merged commit 625a05a2a5 into master 2024-11-04 20:20:30 +05:30
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ProjectSegfault/publapi#1
No description provided.