if
can be replaced with else if
if
statement for single bool judgmentif
or else
branchmake
call by omitting redundant argumentsswitch
with single case can be rewritten as if
or if-else
context.Context
should be the first paramGet
should return a value