func ExampleCreate() { s3util.DefaultConfig.AccessKey = "...access key..." s3util.DefaultConfig.SecretKey = "...secret key..." r, _ := os.Open("/dev/stdin") w, _ := s3util.Create("https://mybucket.s3.amazonaws.com/log.txt", nil, nil) io.Copy(w, r) w.Close() }
func create(s string) (io.WriteCloser, error) { if isURL(s) { return s3util.Create(s, nil, nil) } return os.Create(s) }