Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import semver
|
||||
|
||||
fn main() {
|
||||
semver.from('asd') or { check_error(err) }
|
||||
semver.from('') or { check_error(err) }
|
||||
}
|
||||
|
||||
fn check_error(err IError) {
|
||||
match err {
|
||||
semver.InvalidVersionFormatError {
|
||||
println('wrong format')
|
||||
}
|
||||
semver.EmptyInputError {
|
||||
println('empty input')
|
||||
}
|
||||
else {
|
||||
println('unknown error')
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user