WriteKeyWord writes the `keyWord` into writer. `keyWord` will be converted format(uppercase and lowercase for now) according to `RestoreFlags`.
(keyWord string)
| 298 | // WriteKeyWord writes the `keyWord` into writer. |
| 299 | // `keyWord` will be converted format(uppercase and lowercase for now) according to `RestoreFlags`. |
| 300 | func (ctx *RestoreCtx) WriteKeyWord(keyWord string) { |
| 301 | switch { |
| 302 | case ctx.Flags.HasKeyWordUppercaseFlag(): |
| 303 | keyWord = strings.ToUpper(keyWord) |
| 304 | case ctx.Flags.HasKeyWordLowercaseFlag(): |
| 305 | keyWord = strings.ToLower(keyWord) |
| 306 | } |
| 307 | fmt.Fprint(ctx.In, keyWord) |
| 308 | } |
| 309 | |
| 310 | // WriteString writes the string into writer |
| 311 | // `str` may be wrapped in quotes and escaped according to RestoreFlags. |