Backporting flagValue func from v2 branch
Backporting flagValue func from v2 branch

pjvds/cli,ykanda/cli,phinnaeus/cli,pjvds/cli,cmars/tools,codegangsta/cli,phinnaeus/cli,cmars/tools,minio/cli,minio/cli,cmars/tools,minio/cli,cmars/tools,murdinc/cli,codegangsta/cli,urfave/cli,ykanda/cli,murdinc/cli,murdinc/cli,pjvds/cli,phinnaeus/cli,ykanda/cli,urfave/cli