parse static method

ReleaseNotesFormat parse(
  1. String input
)

Implementation

static ReleaseNotesFormat parse(String input) {
  switch (input.toLowerCase()) {
    case 'json':
      return ReleaseNotesFormat.json;
    case 'text':
    case 'txt':
      return ReleaseNotesFormat.text;
    case 'markdown':
    case 'md':
    default:
      return ReleaseNotesFormat.markdown;
  }
}