From 6fee0986c44186bf11a5097c5d122e54ba503c2e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 7 May 2011 12:05:24 -0400 Subject: [PATCH] Update the compiler to release.r57.1 --- build.py | 2 +- src/config.go | 2 +- src/paths.go | 2 +- src/server.go | 8 ++++---- src/tv_rename.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.py b/build.py index a221b58..49014ec 100755 --- a/build.py +++ b/build.py @@ -60,7 +60,7 @@ RESOURCES_CLOSURE = [ PRODUCT_NAME = 'armadillo' # The Golang version (hg id). -BACK_END_COMPILER_VERSION = 'c5c62aeb6267 release/release.r56/weekly.2011-03-07.1' +BACK_END_COMPILER_VERSION = '95d2ce135523 (release-branch.r57) release/release.r57.1' COMPILER = '6g' LINKER = '6l' diff --git a/src/config.go b/src/config.go index 30c7193..5a8a4c1 100644 --- a/src/config.go +++ b/src/config.go @@ -36,7 +36,7 @@ type Configuration struct { } func ReadFromFile(aPath string, config *Configuration) os.Error { - fd, error := os.Open(aPath, os.O_RDONLY, 0) + fd, error := os.Open(aPath) if error != nil { return error } diff --git a/src/paths.go b/src/paths.go index 584910b..617d5a9 100644 --- a/src/paths.go +++ b/src/paths.go @@ -47,7 +47,7 @@ func List(the_path string) (files vector.StringVector, err os.Error) { return nil, os.NewError("Path outside of jail") } - fd, file_error := os.Open(full_path, os.O_RDONLY, 0) + fd, file_error := os.Open(full_path) if file_error != nil { return nil, file_error } diff --git a/src/server.go b/src/server.go index 6f26279..8d8adf3 100644 --- a/src/server.go +++ b/src/server.go @@ -28,7 +28,7 @@ var kFrontEndFiles string = path.Join(dir, "fe") var gConfig *config.Configuration = nil func indexHandler(response http.ResponseWriter, request *http.Request) { - fd, err := os.Open(path.Join(kFrontEndFiles, "index.html"), os.O_RDONLY, 0) + fd, err := os.Open(path.Join(kFrontEndFiles, "index.html")) if err != nil { fmt.Print("Error opening file ", err.String(), "\n") return @@ -119,7 +119,7 @@ func proxyHandler(response http.ResponseWriter, request *http.Request) { } func performProxy(url *http.URL, response http.ResponseWriter, origRequest *http.Request) os.Error { - conn, err := net.Dial("tcp", "", url.Host+":http") + conn, err := net.Dial("tcp", url.Host+":http") if err != nil { return err } @@ -149,7 +149,7 @@ func errorResponse(response http.ResponseWriter, message string) { } json_data, err := json.Marshal(data) - response.SetHeader("Content-Type", "text/json") + response.Header().Set("Content-Type", "text/json") if err != nil { io.WriteString(response, "{\"error\":\"-9\",\"message\":\"Internal encoding error\"}") } else { @@ -158,7 +158,7 @@ func errorResponse(response http.ResponseWriter, message string) { } func okResponse(response http.ResponseWriter, data interface{}) { - response.SetHeader("Content-Type", "text/json") + response.Header().Set("Content-Type", "text/json") json_data, err := json.Marshal(data) if err != nil { errorResponse(response, "Internal encoding error") diff --git a/src/tv_rename.go b/src/tv_rename.go index 10982e6..4f003be 100644 --- a/src/tv_rename.go +++ b/src/tv_rename.go @@ -119,7 +119,7 @@ func performLookup(urlString string) (*http.Response, os.Error) { } // Open a TCP connection. - conn, err := net.Dial("tcp", "", url.Host+":"+url.Scheme) + conn, err := net.Dial("tcp", url.Host+":"+url.Scheme) if err != nil { return nil, err } -- 2.22.5