{"action":"opened","issue":{"url":"https://api.github.com/repos/codegangsta/cli/issues/247","labels_url":"https://api.github.com/repos/codegangsta/cli/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/codegangsta/cli/issues/247/comments","events_url":"https://api.github.com/repos/codegangsta/cli/issues/247/events","html_url":"https://github.com/codegangsta/cli/issues/247","id":90122223,"number":247,"title":"Global Flags are not accessible in Before action","user":{"login":"agarwalpradeep123","id":8644646,"avatar_url":"https://avatars.githubusercontent.com/u/8644646?v=3","gravatar_id":"","url":"https://api.github.com/users/agarwalpradeep123","html_url":"https://github.com/agarwalpradeep123","followers_url":"https://api.github.com/users/agarwalpradeep123/followers","following_url":"https://api.github.com/users/agarwalpradeep123/following{/other_user}","gists_url":"https://api.github.com/users/agarwalpradeep123/gists{/gist_id}","starred_url":"https://api.github.com/users/agarwalpradeep123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agarwalpradeep123/subscriptions","organizations_url":"https://api.github.com/users/agarwalpradeep123/orgs","repos_url":"https://api.github.com/users/agarwalpradeep123/repos","events_url":"https://api.github.com/users/agarwalpradeep123/events{/privacy}","received_events_url":"https://api.github.com/users/agarwalpradeep123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-22T14:50:15Z","updated_at":"2015-06-22T14:50:15Z","closed_at":null,"body":"I am using codegangsta/cli as below,\r\n\r\napp := cli.NewApp()\r\n\tapp.Name = \"test\"\r\n\tapp.Usage = \"Command Line\"\r\n\tapp.Version = \"0.1\"\r\n\tapp.Before = setLogLevel\r\n\tapp.Flags = []cli.Flag{\r\n\t\tcli.BoolFlag{\r\n\t\t\tName:  \"debug, d\",\r\n\t\t\tUsage: \"Enable debug logging\",\r\n\t\t},\r\n\t}\r\n\r\napp.Commands = []cli.Command{\r\n\t\t{\r\n\t\t\tName:    \"connect\",\r\n\t\t\tAliases: []string{\"c\"},\r\n\t\t\tAction: connect,\r\n\t\t},\r\n}\r\n\r\nNow when I pass global flag as below,\r\ntest -d connect\r\nBut in Before action value of \"debug\" flag is still false"}}