diff options
author | Teddy Wing | 2022-05-08 19:02:09 +0200 |
---|---|---|
committer | Teddy Wing | 2022-05-08 19:02:09 +0200 |
commit | 9f26a100905907be30a78053758d626661a50376 (patch) | |
tree | 4d0c70f872c86fde160472de9a3dc8ce513717e5 | |
parent | 9273bf5776bee60aa12a386eba44d02577a1a810 (diff) | |
download | wajir-9f26a100905907be30a78053758d626661a50376.tar.bz2 |
option.lisp: Remove old required arguments check draft code
-rw-r--r-- | src/option.lisp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/option.lisp b/src/option.lisp index 32fe6d4..e2af930 100644 --- a/src/option.lisp +++ b/src/option.lisp @@ -83,62 +83,8 @@ with code `exit-code`." (opts:exit sysexits:+ok+)) ;; Check required arguments - ; (dolist (opt '(:login :token :endpoint)) - ; ()) - ; (when (null (getf options :login)) - ; (format *error-output* "~S" - ; (loop - ; for opt in '(:login :token :endpoint) - ; with '(opt (null (getf options opt))) - ; collect result)) - ; (when (null (getf options :login)) - ; (let ((required-opts - ; (mapcar - ; #'(lambda (opt) `(,opt ,(not (null (getf options opt))))) - ; '(:login :token :endpoint)))) - ; (format *error-output* "opts: ~S" required-opts) - ; (opts:exit sysexits:+usage+))) - ; (when (or (null (getf options :login)) - ; (null (getf options :token)) - ; (null (getf options :endpoint))) - ; (format *error-output* "error: missing required options: ~A")) - - ; (let* ((required-opts '(:login :token :endpoint)) - ; (opts-missing-p (mapcar - ; #'(lambda (opt) (null (getf options opt))) - ; required-opts))) - ; ; (opts-missing-p (mapcar - ; ; #'(lambda (opt) - ; ; (cons (null (getf options opt)) - ; ; opt)) - ; ; required-opts)) - ; ; (missing-opts (mapcar - ; ; #'second - ; ; (remove-if-not - ; ; #'(lambda (missing-and-opt) (first missing-and-opt)) - ; ; opts-missing-p)))) - ; - ; (format *error-output* "miss: ~S~%" opts-missing-p) - ; (when (or (values opts-missing-p)) - ; (let* ((opt-and-presence - ; (mapcar #'cons opts-missing-p required-opts)) - ; (missing-opts - ; (remove-if - ; #'(lambda (presence-pair) (null (first presence-pair))) - ; opt-and-presence))) - ; - ; (format *error-output* "opts: ~S~%" missing-opts) - ; (opts:exit sysexits:+usage+)))) - ; - ; ; (format *error-output* "v2: ~S~%" missing-opts)) - (let* ((required-opts '(:login :token :endpoint)) - ;; (nil nil t) - ; (opts-missing-p (mapcar - ; #'(lambda (opt) (null (getf options opt))) - ; required-opts)) - ;; ((t . :login) (t . :token) (nil . :endpoint)) (opts-missing-p (mapcar #'(lambda (opt) |