Skip to content

Commit b1ed839

Browse files
committed
move /internal/constants to /pkg/demoinfocs/constants (#336)
some consumers rely on some of these constants
1 parent 740d181 commit b1ed839

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

pkg/demoinfocs/common/player.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/golang/geo/r3"
88

9-
constants "github.com/markus-wa/demoinfocs-golang/v2/internal/constants"
9+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/constants"
1010
st "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables"
1111
)
1212

internal/constants/constants.go renamed to pkg/demoinfocs/constants/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Package constants contains constants that are used internally across the demoinfocs library.
22
package constants
33

4-
// Various constants tat are used internally.
4+
// Various constants that are used internally.
55
const (
66
MaxEdictBits = 11
77
EntityHandleIndexMask = (1 << MaxEdictBits) - 1

pkg/demoinfocs/datatables.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"github.com/golang/geo/r3"
88
"github.com/markus-wa/go-unassert"
99

10-
constants "github.com/markus-wa/demoinfocs-golang/v2/internal/constants"
1110
common "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/common"
11+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/constants"
1212
events "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/events"
1313
st "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables"
1414
)
@@ -280,7 +280,7 @@ func (p *parser) bindNewPlayer(playerEntity st.Entity) {
280280

281281
if isNew {
282282
if pl.SteamID64 != 0 {
283-
p.eventDispatcher.Dispatch(events.PlayerConnect{Player: pl})
283+
p.eventDispatcher.Dispatch(events.PlayerConnect{Player: pl})
284284
} else {
285285
p.eventDispatcher.Dispatch(events.BotConnect{Player: pl})
286286
}

pkg/demoinfocs/game_state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"strconv"
66
"time"
77

8-
constants "github.com/markus-wa/demoinfocs-golang/v2/internal/constants"
98
common "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/common"
9+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/constants"
1010
st "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables"
1111
)
1212

pkg/demoinfocs/game_state_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
"github.com/stretchr/testify/assert"
88

9-
constants "github.com/markus-wa/demoinfocs-golang/v2/internal/constants"
109
common "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/common"
10+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/constants"
1111
st "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables"
1212
stfake "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables/fake"
1313
)

pkg/demoinfocs/sendtables/st_parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"google.golang.org/protobuf/proto"
99

1010
bit "github.com/markus-wa/demoinfocs-golang/v2/internal/bitread"
11-
constants "github.com/markus-wa/demoinfocs-golang/v2/internal/constants"
11+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/constants"
1212
msg "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/msg"
1313
)
1414

0 commit comments

Comments
 (0)