package wpposts import ( "fmt" "github.com/fthvgb1/wp-go/app/pkg/models" ) func PasswordProjectTitle(post *models.Posts) { post.PostTitle = fmt.Sprintf("密码保护:%s", post.PostTitle) } func PasswdProjectContent(post *models.Posts) { format := `

此内容受密码保护。如需查阅,请在下列字段中输入您的密码。

` post.PostContent = fmt.Sprintf(format, post.Id, post.Id) }