Skip to content

Conversation

@Vatican-Cameos
Copy link
Collaborator

@Vatican-Cameos Vatican-Cameos commented Mar 15, 2025

Adding support for config values in the following priority order using viper

  • flag
  • env
  • config
  • default

Added a make file

Test Evidence

  1. Flag
Screenshot 2025-03-22 at 3 49 25 PM
  1. Env
Screenshot 2025-03-22 at 3 50 13 PM
  1. Prioritize Flag over env
Screenshot 2025-03-22 at 3 50 59 PM
  1. Read from config from project root
Screenshot 2025-03-22 at 3 52 06 PM
  1. Support custom config from CLI
Screenshot 2025-03-22 at 3 52 43 PM
  1. Support custom config from ENV
Screenshot 2025-03-22 at 3 53 17 PM
  1. App Defaults (I altered the dns port)
Screenshot 2025-03-22 at 3 58 07 PM
  1. Prioritize env over config for dns port :
Screenshot 2025-03-22 at 3 57 15 PM

@Vatican-Cameos Vatican-Cameos marked this pull request as draft March 15, 2025 23:35
@vivek-pk vivek-pk self-requested a review March 16, 2025 07:19
@Vatican-Cameos Vatican-Cameos marked this pull request as ready for review March 22, 2025 17:14
@Vatican-Cameos Vatican-Cameos changed the title Entertain dns and http ports from flags Configs using Viper Mar 23, 2025
@vivek-pk vivek-pk merged commit fb97242 into main Mar 23, 2025
1 check passed
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