Skip to content

Update README to match context-based API implementation#3

Merged
JohnAmadis merged 2 commits into
mainfrom
copilot/update-readme-for-dmenv
Nov 7, 2025
Merged

Update README to match context-based API implementation#3
JohnAmadis merged 2 commits into
mainfrom
copilot/update-readme-for-dmenv

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 7, 2025

The README documented an obsolete dmenv_init(buffer, size) API that no longer exists. The implementation uses a context-based approach with dmenv_create(parent).

Changes

  • All code examples: Updated to use dmenv_create(NULL) instead of dmenv_init(buffer, size), added context parameters to all function calls, and added proper cleanup with dmenv_destroy(ctx)

  • API Reference: Replaced initialization section with context management functions (dmenv_create, dmenv_destroy, dmenv_is_valid, dmenv_set_as_default, dmenv_get_default), added context parameters to all function signatures, documented integer operations (dmenv_seti/dmenv_geti)

  • Overview sections: Updated Features, Overview, and "What is dmenv?" to describe context-based management and inheritance capabilities

Example

Before:

static char env_buffer[8192];
dmenv_init(env_buffer, 8192);
dmenv_set("APP_NAME", "MyApp");
const char* name = dmenv_get("APP_NAME");

After:

dmenv_ctx_t ctx = dmenv_create(NULL);
dmenv_set(ctx, "APP_NAME", "MyApp");
const char* name = dmenv_get(ctx, "APP_NAME");
dmenv_destroy(ctx);
Original prompt

This section details on the original issue you should resolve

<issue_title>Zaktualizować readme</issue_title>
<issue_description>Readme nie pasuje do implementacji - np jest tam opis funkcji dmenv_init, której już nie ma - teraz jest ten dmenv_create. Trzeba zaktualizować readme</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Update README to reflect current implementation Update README to match context-based API implementation Nov 7, 2025
Copilot AI requested a review from JohnAmadis November 7, 2025 11:39
@JohnAmadis JohnAmadis marked this pull request as ready for review November 7, 2025 11:50
@JohnAmadis JohnAmadis merged commit d53e0e6 into main Nov 7, 2025
6 checks 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.

Zaktualizować readme

2 participants