Skip to content

Allow librespot-golang to be consumed as a new style Go module #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Spotify/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/librespot-org/librespot-golang/src/Spotify

require github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf
4 changes: 4 additions & 0 deletions src/Spotify/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/librespot-org/librespot-golang v0.0.0-20181112205641-23bdf13d9bf3 h1:xb+iOLSUtPYwoYDTFdszji9jZ9eGqCbbAmUmN3hRcL0=
github.com/librespot-org/librespot-golang v0.0.0-20181112205641-23bdf13d9bf3/go.mod h1:p+7XDsra6SFt+S0NW5mwMxRGHUl0vP6/nMWlmxRTKzs=
12 changes: 12 additions & 0 deletions src/examples/micro-client/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module github.com/librespot-org/librespot-golang/src/examples/micro-client

require (
github.com/librespot-org/librespot-golang/src/Spotify v0.0.1
github.com/librespot-org/librespot-golang/src/librespot v0.0.1
github.com/xlab/portaudio-go v0.0.0-20170905165025-132d041879db
github.com/xlab/vorbis-go v0.0.0-20170905164921-1de75b5f6997
)

replace github.com/librespot-org/librespot-golang/src/Spotify => ../../Spotify

replace github.com/librespot-org/librespot-golang/src/librespot => ../../librespot
18 changes: 18 additions & 0 deletions src/examples/micro-client/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51 h1:b6+GdpGhuzxPETrVLwY77iq0L/BqLpcPRmaLNW+SoRY=
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51/go.mod h1:qHRkxMBkkpAWD2poeBYQt6O5IS4dE6w1Cr4Z8Q3feXI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/miekg/dns v1.0.1 h1:6gt2fR2lfjPZ/wsZZZFEDcJLNW5eZwy1zUDIkyqxDsA=
github.com/miekg/dns v1.0.1/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/xlab/portaudio-go v0.0.0-20170905165025-132d041879db h1:sSIQlvfIWUHLDhEWUL2K2CeYv9CDksC00VxuxPUe4lw=
github.com/xlab/portaudio-go v0.0.0-20170905165025-132d041879db/go.mod h1:r57mRacDQMS6Fz8ubv1nE8zZ0DbQ/sY0NkCmdxeUXmY=
github.com/xlab/vorbis-go v0.0.0-20170905164921-1de75b5f6997 h1:vaqno9QlZumpHNt5/a3L3rIF0FJiZ1BQi29RF4cs3CY=
github.com/xlab/vorbis-go v0.0.0-20170905164921-1de75b5f6997/go.mod h1:AMqfx3jFwPqem3u8mF2lsRodZs30jG/Mag5HZ3mB3sA=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919 h1:qFAJ1NcSrOkLdaMbN6OmWeqHdp0aFZy7uWOdL/5ddnU=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
8 changes: 4 additions & 4 deletions src/examples/micro-client/main.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package main

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bufio"
"flag"
"fmt"
"github.com/xlab/portaudio-go/portaudio"
"github.com/xlab/vorbis-go/decoder"
"io/ioutil"
"librespot"
"librespot/core"
"librespot/utils"
"github.com/librespot-org/librespot-golang/src/librespot"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/utils"
"log"
"os"
"strings"
Expand Down
7 changes: 7 additions & 0 deletions src/examples/micro-controller/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/librespot-org/librespot-golang/src/examples/micro-controller

require github.com/librespot-org/librespot-golang/src/librespot v0.0.1

replace github.com/librespot-org/librespot-golang/src/librespot => ../../librespot

replace github.com/librespot-org/librespot-golang/src/Spotify => ../../Spotify
14 changes: 14 additions & 0 deletions src/examples/micro-controller/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51 h1:b6+GdpGhuzxPETrVLwY77iq0L/BqLpcPRmaLNW+SoRY=
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51/go.mod h1:qHRkxMBkkpAWD2poeBYQt6O5IS4dE6w1Cr4Z8Q3feXI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/miekg/dns v1.0.1 h1:6gt2fR2lfjPZ/wsZZZFEDcJLNW5eZwy1zUDIkyqxDsA=
github.com/miekg/dns v1.0.1/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919 h1:qFAJ1NcSrOkLdaMbN6OmWeqHdp0aFZy7uWOdL/5ddnU=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
6 changes: 3 additions & 3 deletions src/examples/micro-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bufio"
"flag"
"fmt"
"librespot"
"librespot/core"
"librespot/spirc"
"github.com/librespot-org/librespot-golang/src/librespot"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/spirc"
"os"
"strconv"
"strings"
Expand Down
8 changes: 4 additions & 4 deletions src/librespot/core/login.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package core

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"encoding/base64"
"fmt"
"github.com/golang/protobuf/proto"
"librespot/connection"
"librespot/discovery"
"librespot/utils"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/discovery"
"github.com/librespot-org/librespot-golang/src/librespot/utils"
"log"
)

Expand Down
14 changes: 7 additions & 7 deletions src/librespot/core/session.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package core

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"fmt"
"github.com/golang/protobuf/proto"
"io"
"librespot/connection"
"librespot/crypto"
"librespot/discovery"
"librespot/mercury"
"librespot/player"
"librespot/utils"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/crypto"
"github.com/librespot-org/librespot-golang/src/librespot/discovery"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/player"
"github.com/librespot-org/librespot-golang/src/librespot/utils"
"log"
"net"
"time"
Expand Down
10 changes: 5 additions & 5 deletions src/librespot/core/session_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package core

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"encoding/binary"
"github.com/golang/protobuf/proto"
"io"
"librespot/connection"
"librespot/crypto"
"librespot/mercury"
"librespot/spirc"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/crypto"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/spirc"
"math/big"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion src/librespot/crypto/shannon.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/binary"
"io"
"librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"log"
"sync"
)
Expand Down
4 changes: 2 additions & 2 deletions src/librespot/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"strings"
"sync"

"librespot/crypto"
"librespot/utils"
"github.com/librespot-org/librespot-golang/src/librespot/crypto"
"github.com/librespot-org/librespot-golang/src/librespot/utils"
"net"
)

Expand Down
16 changes: 16 additions & 0 deletions src/librespot/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module github.com/librespot-org/librespot-golang/src/librespot

require (
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf
github.com/librespot-org/librespot-golang/src/Spotify v0.0.1
github.com/miekg/dns v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.1
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce // indirect
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
)

replace github.com/librespot-org/librespot-golang/src/Spotify => ../Spotify
20 changes: 20 additions & 0 deletions src/librespot/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51 h1:b6+GdpGhuzxPETrVLwY77iq0L/BqLpcPRmaLNW+SoRY=
github.com/badfortrains/mdns v0.0.0-20160325001438-447166384f51/go.mod h1:qHRkxMBkkpAWD2poeBYQt6O5IS4dE6w1Cr4Z8Q3feXI=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/librespot-org/librespot-golang v0.0.0-20181112205641-23bdf13d9bf3 h1:xb+iOLSUtPYwoYDTFdszji9jZ9eGqCbbAmUmN3hRcL0=
github.com/librespot-org/librespot-golang v0.0.0-20181112205641-23bdf13d9bf3/go.mod h1:p+7XDsra6SFt+S0NW5mwMxRGHUl0vP6/nMWlmxRTKzs=
github.com/miekg/dns v1.0.1 h1:6gt2fR2lfjPZ/wsZZZFEDcJLNW5eZwy1zUDIkyqxDsA=
github.com/miekg/dns v1.0.1/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919 h1:qFAJ1NcSrOkLdaMbN6OmWeqHdp0aFZy7uWOdL/5ddnU=
golang.org/x/crypto v0.0.0-20171219041129-d585fd2cc919/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
4 changes: 2 additions & 2 deletions src/librespot/mercury/api.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package mercury

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"encoding/json"
"fmt"
"github.com/golang/protobuf/proto"
"librespot/metadata"
"github.com/librespot-org/librespot-golang/src/librespot/metadata"
"net/url"
)

Expand Down
4 changes: 2 additions & 2 deletions src/librespot/mercury/mercury.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package mercury

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"encoding/binary"
"fmt"
"github.com/golang/protobuf/proto"
"io"
"librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"sync"
)

Expand Down
8 changes: 4 additions & 4 deletions src/librespot/mercury/mercury_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package mercury

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"encoding/binary"
"github.com/golang/protobuf/proto"
"librespot/connection"
"librespot/core"
"librespot/spirc"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/spirc"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions src/librespot/player/audiofile.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package player

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"fmt"
"io"
"librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"math"
"sync"
)
Expand Down
2 changes: 1 addition & 1 deletion src/librespot/player/decrypt_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package player_test

import (
"librespot/player"
"github.com/librespot-org/librespot-golang/src/librespot/player"
"testing"
)

Expand Down
6 changes: 3 additions & 3 deletions src/librespot/player/player.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package player

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"encoding/binary"
"fmt"
"librespot/connection"
"librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
"log"
"sync"
)
Expand Down
8 changes: 4 additions & 4 deletions src/librespot/spirc/controller.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package spirc

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"librespot/core"
"librespot/mercury"
"librespot/utils"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/utils"
"strings"
"sync"
)
Expand Down
6 changes: 3 additions & 3 deletions src/librespot/spirc/controller_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package spirc

import (
"Spotify"
"github.com/librespot-org/librespot-golang/src/Spotify"
"bytes"
"github.com/golang/protobuf/proto"
"librespot/connection"
"librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/connection"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion src/librespot/spotify.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package librespot

import (
"librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/core"
)

// Login to Spotify using username and password
Expand Down
2 changes: 1 addition & 1 deletion src/librespot/utils/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"encoding/json"
"errors"
"golang.org/x/crypto/pbkdf2"
"librespot/crypto"
"github.com/librespot-org/librespot-golang/src/librespot/crypto"
"log"
"math/big"
"os"
Expand Down
2 changes: 1 addition & 1 deletion src/librespotmobile/audiofile.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package librespotmobile

import "librespot/player"
import "github.com/librespot-org/librespot-golang/src/librespot/player"

// MobileAudioFile is a gomobile-compliant subset of the AudioFile struct. It
// is allocated by the MobilePlayer struct and functions.
Expand Down
4 changes: 2 additions & 2 deletions src/librespotmobile/mercury.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package librespotmobile

import (
"encoding/json"
"librespot/core"
"librespot/mercury"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/mercury"
)

type MobileMercury struct {
Expand Down
6 changes: 3 additions & 3 deletions src/librespotmobile/player.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package librespotmobile

import (
"Spotify"
"librespot/core"
"librespot/player"
"github.com/librespot-org/librespot-golang/src/Spotify"
"github.com/librespot-org/librespot-golang/src/librespot/core"
"github.com/librespot-org/librespot-golang/src/librespot/player"
)

// MobilePlayer is a gomobile-compliant subset of the Player struct.
Expand Down
Loading