Browse files

s3: added fake server

  • Loading branch information...
1 parent 1d97029 commit 48af7779b17e339221821d6cdf245d106aca55f5 @fsouza committed Dec 8, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 s3fake/server.go
View
22 s3fake/server.go
@@ -0,0 +1,22 @@
+// Copyright 2012 Francisco Souza. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "launchpad.net/goamz/s3/s3test"
+ "log"
+)
+
+func main() {
+ server, err := s3test.NewServer()
+ if err != nil {
+ log.Fatalf("Failed to start server: %s.", err)
+ }
+ defer server.Quit()
+ fmt.Printf("Server is listening at %s.\nPress Ctrl-C to close it.\n", server.URL())
+ for {
+ }
+}

0 comments on commit 48af777

Please sign in to comment.