重构循环，改固定10次为达到条件自动跳出
add switch
add defer
add pointers
add struct
add array
add slices
add maps
merged from hubo-dev