New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing Environmental Utility #272
Open
RockfordWei
wants to merge
55
commits into
PerfectlySoft:master
Choose a base branch
from
RockfordWei:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Nov 7, 2018
-
Implementing Environmental Utility
# Environmental Operations ## Usage First, ensure the `PerfectLib` is imported in your Swift file: ``` swift import PerfectLib ``` You are now able to use the `Env` class to operate the environmental variables ### Set - Single Variable Setting: This statement is equal to bash command "export foo=bar" ``` swift Env.set("foo", value: "bar") ``` - Group Setting: It is also possible to set a group of variables in a dictionary style: ``` swift Env.set(["foo":"bar", "koo":"kar"]) // the result is identically the same as "export foo=bar && export koo=kar" ``` ### Get - Single variable query: ``` swift guard let foo = Env.get("foo") else { // there is no such a variable } ``` - Single variable query with a default value: ``` swift guard let foo = Env.get("foo", defaultValue: "bar") else { // there is no such a variable even with a default value?? } ``` - Query all system variables: ``` swift let all = Env.get() // the result of all is a dictionary [String: String] ``` ### Delete - Delete an environmental variable: ``` swift Env.del("foo") ```
Configuration menu - View commit details
-
Copy full SHA for e4d43ad - Browse repository at this point
Copy the full SHA e4d43adView commit details
Commits on Jul 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f77dd77 - Browse repository at this point
Copy the full SHA f77dd77View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6d581d - Browse repository at this point
Copy the full SHA d6d581dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52d396f - Browse repository at this point
Copy the full SHA 52d396fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fda2a6 - Browse repository at this point
Copy the full SHA 3fda2a6View commit details
Commits on Jul 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 85bc2e8 - Browse repository at this point
Copy the full SHA 85bc2e8View commit details
Commits on Jun 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4c2aabe - Browse repository at this point
Copy the full SHA 4c2aabeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b6ed74 - Browse repository at this point
Copy the full SHA 8b6ed74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a32069 - Browse repository at this point
Copy the full SHA 7a32069View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e97a95 - Browse repository at this point
Copy the full SHA 6e97a95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1006008 - Browse repository at this point
Copy the full SHA 1006008View commit details -
Configuration menu - View commit details
-
Copy full SHA for 259947d - Browse repository at this point
Copy the full SHA 259947dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7940981 - Browse repository at this point
Copy the full SHA 7940981View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c266a7 - Browse repository at this point
Copy the full SHA 0c266a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for fdd26cc - Browse repository at this point
Copy the full SHA fdd26ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7397f49 - Browse repository at this point
Copy the full SHA 7397f49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91eec70 - Browse repository at this point
Copy the full SHA 91eec70View commit details
Commits on Jun 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for bd8d3d1 - Browse repository at this point
Copy the full SHA bd8d3d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 526a419 - Browse repository at this point
Copy the full SHA 526a419View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f1dfc0 - Browse repository at this point
Copy the full SHA 7f1dfc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39f0242 - Browse repository at this point
Copy the full SHA 39f0242View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe5479e - Browse repository at this point
Copy the full SHA fe5479eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d29d752 - Browse repository at this point
Copy the full SHA d29d752View commit details
Commits on Jun 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for cd8c49c - Browse repository at this point
Copy the full SHA cd8c49cView commit details
Commits on Jun 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 159d209 - Browse repository at this point
Copy the full SHA 159d209View commit details
Commits on Jun 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 70a77ff - Browse repository at this point
Copy the full SHA 70a77ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for a03a65f - Browse repository at this point
Copy the full SHA a03a65fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d5d8e8 - Browse repository at this point
Copy the full SHA 8d5d8e8View commit details
Commits on Jun 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 252a222 - Browse repository at this point
Copy the full SHA 252a222View commit details -
Configuration menu - View commit details
-
Copy full SHA for 972a7a5 - Browse repository at this point
Copy the full SHA 972a7a5View commit details -
Merge pull request #1 from RockfordWei/dev-swift-5-3
Enabling Swift 5.4
Configuration menu - View commit details
-
Copy full SHA for a8a57e7 - Browse repository at this point
Copy the full SHA a8a57e7View commit details
Commits on Jun 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4237c07 - Browse repository at this point
Copy the full SHA 4237c07View commit details
Commits on Jul 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 22e5df9 - Browse repository at this point
Copy the full SHA 22e5df9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d20052 - Browse repository at this point
Copy the full SHA 3d20052View commit details -
Configuration menu - View commit details
-
Copy full SHA for e12fd3a - Browse repository at this point
Copy the full SHA e12fd3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d7b34a - Browse repository at this point
Copy the full SHA 0d7b34aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8261bb4 - Browse repository at this point
Copy the full SHA 8261bb4View commit details
Commits on Jul 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0099e9e - Browse repository at this point
Copy the full SHA 0099e9eView commit details
Commits on Jul 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f7f186e - Browse repository at this point
Copy the full SHA f7f186eView commit details
Commits on Jul 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2baed19 - Browse repository at this point
Copy the full SHA 2baed19View commit details
Commits on Jul 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e1d9ecd - Browse repository at this point
Copy the full SHA e1d9ecdView commit details
Commits on Aug 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1b4ddb5 - Browse repository at this point
Copy the full SHA 1b4ddb5View commit details
Commits on Apr 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4d578a4 - Browse repository at this point
Copy the full SHA 4d578a4View commit details -
Merge pull request #2 from RockyCognizant/master
clear all warnings.
Configuration menu - View commit details
-
Copy full SHA for e93a4a2 - Browse repository at this point
Copy the full SHA e93a4a2View commit details
Commits on Apr 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a33126b - Browse repository at this point
Copy the full SHA a33126bView commit details
Commits on May 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d0dfb66 - Browse repository at this point
Copy the full SHA d0dfb66View commit details
Commits on Aug 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7726549 - Browse repository at this point
Copy the full SHA 7726549View commit details
Commits on Aug 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7b82b4a - Browse repository at this point
Copy the full SHA 7b82b4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 224e039 - Browse repository at this point
Copy the full SHA 224e039View commit details -
Configuration menu - View commit details
-
Copy full SHA for abfc248 - Browse repository at this point
Copy the full SHA abfc248View commit details
Commits on Aug 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f719093 - Browse repository at this point
Copy the full SHA f719093View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f55811 - Browse repository at this point
Copy the full SHA 9f55811View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70935e5 - Browse repository at this point
Copy the full SHA 70935e5View commit details
Commits on Feb 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8af193f - Browse repository at this point
Copy the full SHA 8af193fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65439bb - Browse repository at this point
Copy the full SHA 65439bbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.