package main import "fmt" func main() { fName := "clientupdateVersion" pName := "version" otherParameters := [] string {} printFuncHeader(fName,pName) printFuncParameter(otherParameters) } func printFuncHeader(fName string,pName string) { fmt.Printf("+ (NSDictionary *)%s:(NSString *)%s",fName,pName) return } func printFuncParameter(otherParameters [] string) { for _,value := range otherParameters { fmt.Printf("\n%s:(NSString *)%s",value,value) } fmt.Println(";") return }
好吧,的确很low,有空研究下如何自动写入到系统剪贴板,这样就可以偷懒不去复制了...