目录
目录Readme.md

Env

Build Status codecov Platform Language: Swift Carthage

Why?

If you are developing cross platform command line apps, you need an easy way to interact with the environment variables. Env provides just that.

You can use Env with Guaka to create aweseome command line applications.

Usage

// Set an enviroment variable
Env.set("key1", "value1")

// Get an environment variable
Env.get("SomeKey")

// Clear all variables
Env.clear()

// Get all keys and values
Env.keys()
Env.values()

Installation

You can install Env using Swift Package Manager (SPM) or Carthage.

Swift Package Manager

Add Env as dependency in your Package.swift.

import PackageDescription

let package = Package(name: "YourPackage",
    dependencies: [
        .package(url: "https://github.com/getGuaka/Env.git", from: "0.0.0"),
    ]
)

Carthage

github "getGuaka/Env"

Tests

Tests can be found here.

Run them with

swift test

Contributing

Just send a PR! We don’t bite ;)

关于
42.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号