Skip to content

Commit

Permalink
bump version to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy PAGEARD committed Jul 24, 2021
1 parent 6983ce7 commit 270330e
Show file tree
Hide file tree
Showing 42 changed files with 111 additions and 111 deletions.
8 changes: 4 additions & 4 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"sync/atomic"
"time"

"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
"google.golang.org/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions auth_events.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package steam

import (
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
)

type LoggedOnEvent struct {
Expand Down
12 changes: 6 additions & 6 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"sync/atomic"
"time"

"github.com/Philipp15b/go-steam/v2/cryptoutil"
"github.com/Philipp15b/go-steam/v2/netutil"
"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/cryptoutil"
"github.com/Philipp15b/go-steam/v3/netutil"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
)

// Represents a client to the Steam network.
Expand Down
2 changes: 1 addition & 1 deletion client_events.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package steam

import (
"github.com/Philipp15b/go-steam/v2/netutil"
"github.com/Philipp15b/go-steam/v3/netutil"
)

// When this event is emitted by the Client, the connection is automatically closed.
Expand Down
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"net"
"sync"

"github.com/Philipp15b/go-steam/v2/cryptoutil"
"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v3/cryptoutil"
"github.com/Philipp15b/go-steam/v3/protocol"
)

type connection interface {
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ You can also find a running example in the `gsbot` package.
"io/ioutil"
"log"
"github.com/Philipp15b/go-steam/v2"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
)
func main() {
Expand Down
2 changes: 1 addition & 1 deletion economy/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"strconv"

"github.com/Philipp15b/go-steam/v2/jsont"
"github.com/Philipp15b/go-steam/v3/jsont"
)

type GenericInventory map[uint32]map[uint64]*Inventory
Expand Down
2 changes: 1 addition & 1 deletion economy/inventory/inventory_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"regexp"
"strconv"

"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/steamid"
)

type InventoryApps map[string]*InventoryApp
Expand Down
8 changes: 4 additions & 4 deletions gamecoordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package steam
import (
"bytes"

"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/gamecoordinator"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/gamecoordinator"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"google.golang.org/protobuf/proto"
)

Expand Down
6 changes: 3 additions & 3 deletions generator/GoSteamLanguageGenerator/GoGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public void EmitClasses(Node root, StringBuilder sb)
sb.AppendLine(" \"io\"");
sb.AppendLine(" \"encoding/binary\"");
sb.AppendLine(" \"google.golang.org/protobuf/proto\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v2/steamid\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v2/rwu\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v2/protocol/protobuf\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v3/steamid\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v3/rwu\"");
sb.AppendLine(" \"github.com/Philipp15b/go-steam/v3/protocol/protobuf\"");
sb.AppendLine(")");
sb.AppendLine();

Expand Down
14 changes: 8 additions & 6 deletions generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func forceRename(from, to string) error {
}

var pkgRegex = regexp.MustCompile(`(package \w+)`)
var pkgCommentRegex = regexp.MustCompile(`(?s)(\/\*.*?\*\/\n)package`)
var unusedImportCommentRegex = regexp.MustCompile("// discarding unused import .*\n")
var fileDescriptorVarRegex = regexp.MustCompile(`fileDescriptor\d+`)

Expand All @@ -222,7 +221,7 @@ func fixProto(outDir, path string) {
importsToRemove := make([]*ast.ImportSpec, 0)
for _, i := range f.Imports {
// We remove all local imports
if i.Path.Value == "\".\"" {
if strings.Contains(i.Path.Value, ".proto") {
importsToRemove = append(importsToRemove, i)
}
}
Expand All @@ -231,7 +230,7 @@ func fixProto(outDir, path string) {
// remove the package name from all types
file = bytes.Replace(file, []byte(itr.Name.Name+"."), []byte{}, -1)
// and remove the import itself
file = bytes.Replace(file, []byte(fmt.Sprintf("import %v %v\n", itr.Name.Name, itr.Path.Value)), []byte{}, -1)
file = bytes.Replace(file, []byte(fmt.Sprintf("%v %v", itr.Name.Name, itr.Path.Value)), []byte{}, -1)
}

// remove warnings
Expand All @@ -242,7 +241,9 @@ func fixProto(outDir, path string) {

// fix the google dependency;
// we just reuse the one from protoc-gen-go
file = bytes.Replace(file, []byte("google/protobuf"), []byte("google.golang.org/protobuf/types/known/descriptorpb"), -1)
file = bytes.Replace(file, []byte("google/protobuf"), []byte("google.golang.org/protobuf"), -1)

file = bytes.Replace(file, []byte("google.golang.org/protobuf/descriptor.proto"), []byte("google.golang.org/protobuf/types/descriptorpb"), -1)

// we need to prefix local variables created by protoc-gen-go so that they don't clash with others in the same package
filename := strings.Split(filepath.Base(path), ".")[0]
Expand Down Expand Up @@ -312,11 +313,12 @@ func execute(command string, args []string) {
}

cmd := exec.Command(command, args...)
cmd.Stdout = newQuotedWriter(os.Stdout)
cmd.Stderr = newQuotedWriter(os.Stderr)

_, err := cmd.CombinedOutput()
err := cmd.Run()
if err != nil {
printerr(err.Error())
os.Exit(1)
}

}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Philipp15b/go-steam/v2
module github.com/Philipp15b/go-steam/v3

go 1.16

Expand All @@ -7,4 +7,4 @@ require (
google.golang.org/protobuf v1.27.1
)

retract v2.0.0
retract v3.0.0
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
google.golang.org/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
7 changes: 4 additions & 3 deletions gsbot/gsbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"reflect"
"time"

"github.com/Philipp15b/go-steam/v2"
"github.com/Philipp15b/go-steam/v2/netutil"
"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v3"
"github.com/Philipp15b/go-steam/v3/netutil"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/davecgh/go-spew/spew"
)

Expand All @@ -41,6 +41,7 @@ func Default() *GsBot {
log.New(os.Stdout, "", 0),
}
}

// This module handles authentication. It logs on automatically after a ConnectedEvent
// and saves the sentry data to a file which is also used for logon if available.
// If you're logging on for the first time Steam may require an authcode. You can then
Expand Down
12 changes: 6 additions & 6 deletions gsbot/gsbot/gsbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ import (
"fmt"
"os"

"github.com/Philipp15b/go-steam/v2"
"github.com/Philipp15b/go-steam/v2/gsbot"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3"
"github.com/Philipp15b/go-steam/v3/gsbot"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
)

const usage string = "usage: gsbot [username] [-p password] [-a authcode] [-t twofactorcode] [-l loginkey]"

func main() {
if len(os.Args) < 3 || len(os.Args) % 2 != 0 {
if len(os.Args) < 3 || len(os.Args)%2 != 0 {
fmt.Println(usage)
return
}

details := &steam.LogOnDetails{
Username: os.Args[1],
Username: os.Args[1],
ShouldRememberPassword: true,
}

for i := 2; i < len(os.Args) - 1; i += 2 {
for i := 2; i < len(os.Args)-1; i += 2 {
switch os.Args[i] {
case "-p":
details.Password = os.Args[i+1]
Expand Down
4 changes: 2 additions & 2 deletions keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package steam
import (
"crypto/rsa"

"github.com/Philipp15b/go-steam/v2/cryptoutil"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/cryptoutil"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
)

var publicKeys = map[steamlang.EUniverse][]byte{
Expand Down
6 changes: 3 additions & 3 deletions notifications.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package steam

import (
"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
)

type Notifications struct {
Expand Down
4 changes: 2 additions & 2 deletions protocol/gamecoordinator/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package gamecoordinator
import (
"io"

"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"google.golang.org/protobuf/proto"
)

Expand Down
6 changes: 3 additions & 3 deletions protocol/gamecoordinator/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package gamecoordinator
import (
"bytes"

"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion protocol/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math"
"strconv"

"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
)

type JobId uint64
Expand Down
4 changes: 2 additions & 2 deletions protocol/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package protocol
import (
"io"

"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion protocol/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/binary"
"fmt"

"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"google.golang.org/protobuf/proto"
)

Expand Down
6 changes: 3 additions & 3 deletions protocol/steamlang/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package steamlang

import (
"encoding/binary"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/rwu"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/rwu"
"github.com/Philipp15b/go-steam/v3/steamid"
"google.golang.org/protobuf/proto"
"io"
)
Expand Down
2 changes: 1 addition & 1 deletion servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/rand"
"time"

"github.com/Philipp15b/go-steam/v2/netutil"
"github.com/Philipp15b/go-steam/v3/netutil"
)

// CMServers contains a list of worlwide servers
Expand Down
12 changes: 6 additions & 6 deletions social.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"sync"
"time"

"github.com/Philipp15b/go-steam/v2/protocol"
"github.com/Philipp15b/go-steam/v2/protocol/protobuf"
"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/rwu"
"github.com/Philipp15b/go-steam/v2/socialcache"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol"
"github.com/Philipp15b/go-steam/v3/protocol/protobuf"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/rwu"
"github.com/Philipp15b/go-steam/v3/socialcache"
"github.com/Philipp15b/go-steam/v3/steamid"
"google.golang.org/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions social_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package steam
import (
"time"

"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
)

type FriendsListEvent struct{}
Expand Down
4 changes: 2 additions & 2 deletions socialcache/chats.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"sync"

"github.com/Philipp15b/go-steam/v2/protocol/steamlang"
"github.com/Philipp15b/go-steam/v2/steamid"
"github.com/Philipp15b/go-steam/v3/protocol/steamlang"
"github.com/Philipp15b/go-steam/v3/steamid"
)

// Chats list is a thread safe map
Expand Down
Loading

0 comments on commit 270330e

Please sign in to comment.