Commits

Yaron Minsky  committed 1866b2a

use shared command-line args

  • Participants
  • Parent commits 877fbee

Comments (0)

Files changed (2)

File hello_client.ml

     ~summary:"Hello World client"
     Command.Spec.(
       empty
-      +> flag "-port" (optional_with_default 8012 int)
-        ~doc:" server port"
-      +> flag "-host" (optional_with_default "localhost" string)
-        ~doc:" server host"
+      +> Common.port_arg ()
+      +> Common.host_arg ()
     )
     (fun port host () ->
       say_hello port host

File hello_server.ml

   Command.async_basic
     ~summary:"Hello World server"
     Command.Spec.(
-      empty
-      +> flag "-port" (optional_with_default 8012 int)
-        ~doc:" server port"
+      empty +> Common.port_arg ()
     )
     (fun port () -> Common.start_server ~env:() ~port ~implementations ())