去 github.com/apisit/s3 导入(“github.com/apisit/s3”) //使用它 accessKey := "key" secretKey := "key" keyFilename := "something.jpg" filename := "something.jpg" bucketName := "sps-photos" amazonS3 := s3.Init(accessKey, secretKey ) amazonS3.Upload(keyFilename, bucketName, 文件名)