summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/importer.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-12-12 02:37:52 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-12-12 02:37:52 (GMT)
commit2d85fe4239f7d1d4282250fed232f6cfdc381b70 (patch)
treef530ad3e29e9a693b0f0d07181918488dfd13e05 /src/helsinki.at/rhimport/importer.go
parentd5450bb18ea879ca9a63aa1d16a5c647e8ecf692 (diff)
added xml parse for response of rdxport
Diffstat (limited to 'src/helsinki.at/rhimport/importer.go')
-rw-r--r--src/helsinki.at/rhimport/importer.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/helsinki.at/rhimport/importer.go b/src/helsinki.at/rhimport/importer.go
index e29e4df..749c895 100644
--- a/src/helsinki.at/rhimport/importer.go
+++ b/src/helsinki.at/rhimport/importer.go
@@ -27,10 +27,8 @@ package rhimport
import (
"bufio"
"bytes"
- "encoding/xml"
"fmt"
"github.com/golang-basic/go-curl"
- "io"
"mime/multipart"
"net/http"
"os"
@@ -134,22 +132,6 @@ func NewImportResult(rdres *RDWebResult) *ImportResult {
return res
}
-type RDWebResult struct {
- ResponseCode int `xml:"ResponseCode"`
- ErrorString string `xml:"ErrorString"`
- AudioConvertError int `xml:"AudioConvertError"`
-}
-
-func NewRDWebResultFromXML(data io.Reader) (res *RDWebResult, err error) {
- decoder := xml.NewDecoder(data)
- res = &RDWebResult{}
- if xmlerr := decoder.Decode(res); xmlerr != nil {
- err = fmt.Errorf("Error parsing XML response: %s", xmlerr)
- return
- }
- return
-}
-
func add_cart(ctx *ImportContext) (result *RDWebResult, err error) {
var b bytes.Buffer
w := multipart.NewWriter(&b)