Created
November 1, 2016 14:56
-
-
Save shogonir/d2e3d2457acf61dd74bdee9c1acc2845 to your computer and use it in GitHub Desktop.
Read environmental variable with Scala.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object SysEnv { | |
def main(args: Array[String]) { | |
sys.env.getOrElse("USER", "default") match { | |
case value: String => | |
println(value) | |
case _ => | |
println("not string") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment