diff options
author | Peter Saxton <peterhsaxton@gmail.com> | 2020-06-07 18:28:50 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-06-07 20:36:07 +0100 |
commit | c8313692a1550eb94b6910416a6d5626377d2fc1 (patch) | |
tree | 25024193fb49d9b57fabd56bfe8f8c899a3d043a | |
parent | ab78a6bda4a9274ae615d63ba8c7a093f1b653ce (diff) | |
download | gleam_stdlib-c8313692a1550eb94b6910416a6d5626377d2fc1.tar.gz gleam_stdlib-c8313692a1550eb94b6910416a6d5626377d2fc1.zip |
rename insert_env
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/gleam/os.gleam | 2 | ||||
-rw-r--r-- | test/gleam/os_test.gleam | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a30455b..08e3ad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ - `binary` module created with `from_string`, `byte_size`, `append`, `part`, `int_to_u32` and `int_from_u32`. -- `os` module created with `get_env`, `put_env`, `delete_env`. +- `os` module created with `get_env`, `insert_env`, `delete_env`. - The `string` module gains the `split_once` function. ## 0.9.0 - 2020-05-26 diff --git a/src/gleam/os.gleam b/src/gleam/os.gleam index c5a8c5a..fa74287 100644 --- a/src/gleam/os.gleam +++ b/src/gleam/os.gleam @@ -33,7 +33,7 @@ pub fn get_env() -> List(tuple(String, String)) { } /// Set an environment variable. -pub fn put_env(key: String, value: String) -> Nil { +pub fn insert_env(key: String, value: String) -> Nil { let True = os_putenv(string_to_char_list(key), string_to_char_list(value)) Nil } diff --git a/test/gleam/os_test.gleam b/test/gleam/os_test.gleam index 961e984..b632331 100644 --- a/test/gleam/os_test.gleam +++ b/test/gleam/os_test.gleam @@ -3,7 +3,7 @@ import gleam/os import gleam/should pub fn env_test() { - os.put_env("GLEAM_TEST", "hello") + os.insert_env("GLEAM_TEST", "hello") os.get_env() |> list.key_find("GLEAM_TEST") |> should.equal(Ok("hello")) |