[doc] fix code examples