[PR #1608] [CLOSED] WIP: read config from environment variables #1653

Closed
opened 2026-03-03 12:35:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1608
Author: @vichle
Created: 5/13/2024
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • d0a7434 WIP: read config from environment variables

📊 Changes

2 files changed (+80 additions, -6 deletions)

View changed files

📝 internal/config/config.go (+9 -1)
📝 internal/config/config_test.go (+71 -5)

📄 Description

This is a first draft of reading configuration from environment variables (#561) . I chose a different approach than #1041, let me know what you think! I've only added support for a single arg for now: backend using the FAKE_GCS_BACKEND environment variable. I'll update the PR with the rest of the arguments if you think this is a good way of doing it.

I don't usually write golang, so please be thorough in your feedback :)

Open questions:

  • Is this a good approach?
  • Should all arguments be supported?
  • Do we need more tests?

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/1608 **Author:** [@vichle](https://github.com/vichle) **Created:** 5/13/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`d0a7434`](https://github.com/fsouza/fake-gcs-server/commit/d0a74340f62c4db557de122f63df262d69e286bd) WIP: read config from environment variables ### 📊 Changes **2 files changed** (+80 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `internal/config/config.go` (+9 -1) 📝 `internal/config/config_test.go` (+71 -5) </details> ### 📄 Description This is a first draft of reading configuration from environment variables (#561) . I chose a different approach than #1041, let me know what you think! I've only added support for a single arg for now: `backend` using the `FAKE_GCS_BACKEND` environment variable. I'll update the PR with the rest of the arguments if you think this is a good way of doing it. I don't usually write golang, so please be thorough in your feedback :) Open questions: - Is this a good approach? - Should all arguments be supported? - Do we need more tests? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:35:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/fake-gcs-server#1653
No description provided.