I referred to https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/info.rb#L54