summaryrefslogtreecommitdiff
path: root/go/phone-number/README.md
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-08-30 02:19:29 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-08-30 02:19:29 +0200
commit4fbacfaf2a8fdac29e06df4b09b92ae228a55b51 (patch)
treea80655f17b019491ce461a61e95e40aec2fa9018 /go/phone-number/README.md
parent89539daca2be78d19e36e0f5b952d3ec259c8e78 (diff)
Solve phone
Diffstat (limited to 'go/phone-number/README.md')
-rw-r--r--go/phone-number/README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/go/phone-number/README.md b/go/phone-number/README.md
new file mode 100644
index 0000000..ce88c4e
--- /dev/null
+++ b/go/phone-number/README.md
@@ -0,0 +1,38 @@
+# Phone Number
+
+Write a program that cleans up user-entered phone numbers so that they can be sent SMS messages.
+
+The rules are as follows:
+
+- If the phone number is less than 10 digits assume that it is bad
+ number
+- If the phone number is 10 digits assume that it is good
+- If the phone number is 11 digits and the first number is 1, trim the 1
+ and use the last 10 digits
+- If the phone number is 11 digits and the first number is not 1, then
+ it is a bad number
+- If the phone number is more than 11 digits assume that it is a bad
+ number
+
+We've provided tests, now make them pass.
+
+Hint: Only make one test pass at a time. Disable the others, then flip
+each on in turn after you get the current failing one to pass.
+
+To run the tests simply run the command `go test` in the exercise directory.
+
+If the test suite contains benchmarks, you can run these with the `-bench`
+flag:
+
+ go test -bench .
+
+For more detailed info about the Go track see the [help
+page](http://exercism.io/languages/go).
+
+## Source
+
+Event Manager by JumpstartLab [http://tutorials.jumpstartlab.com/projects/eventmanager.html](http://tutorials.jumpstartlab.com/projects/eventmanager.html)
+
+## Submitting Incomplete Problems
+It's possible to submit an incomplete solution so you can see how others have completed the exercise.
+