jawher / mow.cli

A versatile library for building CLI applications in Go
MIT License
872 stars 55 forks source link

Fix parsing of long option values containing = sign #75

Closed jawher closed 6 years ago

jawher commented 6 years ago

Problem

The parsing fails when you a value containing = to a long option, e.g.:

app --ns=value=

Fix

Correctly separate the option name from the option value by limiting the splits on = to 2.

Fixes #74

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 95.992% when pulling 6b53ad69aa6a74dfc203aa1c39f3a2d0d2f23da1 on issue-74-equal-in-long-opt-value into b76d58b46609ca80ec9770af083eebee7546b3a2 on master.

coriolinus commented 6 years ago

Thanks! That was a really excellent response time; I appreciate it!