shell 生产带有作者信息的基本go源文件

#!/bin/bash

# Program to output a go source file with user information

CURRENT_TIME=$(date +"%x %r %Z")
cat << EOF
/*
Author:$USER
CreatedAt:$CURRENT_TIME
*/
package main
import(
"fmt"
)
func main(){
fmt.Println("Hello World!")
}
EOF

posted @ 2014-05-26 13:07  ggaaooppeenngg  阅读(189)  评论(0编辑  收藏  举报