1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2025-02-02 22:57:04 -05:00

d2common: fix all fieldalignments

This commit is contained in:
gucio321 2021-06-13 17:50:58 +02:00
parent 68b4562159
commit cbfd8efce8
3 changed files with 16 additions and 16 deletions

View File

@ -17,11 +17,11 @@ var _ asset.Asset = &Asset{}
// Asset represents an asset that is in the host filesystem // Asset represents an asset that is in the host filesystem
type Asset struct { type Asset struct {
assetType types.AssetType
source *Source source *Source
data []byte
path string
file *os.File file *os.File
path string
data []byte
assetType types.AssetType
} }
// Type returns the asset type // Type returns the asset type

View File

@ -19,9 +19,9 @@ var _ asset.Asset = &Asset{}
// Asset represents a file record within an MPQ archive // Asset represents a file record within an MPQ archive
type Asset struct { type Asset struct {
stream d2interface.DataStream stream d2interface.DataStream
data []byte
path string
source *Source source *Source
path string
data []byte
} }
// Type returns the asset type // Type returns the asset type

View File

@ -54,39 +54,39 @@ func Test_logger_LogLevels(t *testing.T) {
// for each log level we set, we will use different log methods (info, warning, etc) and check // for each log level we set, we will use different log methods (info, warning, etc) and check
// what the output in the writer is (clearing the writer data before each test) // what the output in the writer is (clearing the writer data before each test)
tests := []struct { tests := []struct {
logLevel LogLevel
expect map[LogLevel]string expect map[LogLevel]string
logLevel LogLevel
}{ }{
{LogLevelDebug, map[LogLevel]string{ {map[LogLevel]string{
LogLevelError: expectedError, LogLevelError: expectedError,
LogLevelWarning: expectedWarning, LogLevelWarning: expectedWarning,
LogLevelInfo: expectedInfo, LogLevelInfo: expectedInfo,
LogLevelDebug: expectedDebug, LogLevelDebug: expectedDebug,
}}, }, LogLevelDebug},
{LogLevelInfo, map[LogLevel]string{ {map[LogLevel]string{
LogLevelError: expectedError, LogLevelError: expectedError,
LogLevelWarning: expectedWarning, LogLevelWarning: expectedWarning,
LogLevelInfo: expectedInfo, LogLevelInfo: expectedInfo,
LogLevelDebug: noMessage, LogLevelDebug: noMessage,
}}, }, LogLevelInfo},
{LogLevelWarning, map[LogLevel]string{ {map[LogLevel]string{
LogLevelError: expectedError, LogLevelError: expectedError,
LogLevelWarning: expectedWarning, LogLevelWarning: expectedWarning,
LogLevelInfo: noMessage, LogLevelInfo: noMessage,
LogLevelDebug: noMessage, LogLevelDebug: noMessage,
}}, }, LogLevelWarning},
{LogLevelError, map[LogLevel]string{ {map[LogLevel]string{
LogLevelError: expectedError, LogLevelError: expectedError,
LogLevelWarning: noMessage, LogLevelWarning: noMessage,
LogLevelInfo: noMessage, LogLevelInfo: noMessage,
LogLevelDebug: noMessage, LogLevelDebug: noMessage,
}}, }, LogLevelError},
{LogLevelNone, map[LogLevel]string{ {map[LogLevel]string{
LogLevelError: noMessage, LogLevelError: noMessage,
LogLevelWarning: noMessage, LogLevelWarning: noMessage,
LogLevelInfo: noMessage, LogLevelInfo: noMessage,
LogLevelDebug: noMessage, LogLevelDebug: noMessage,
}}, }, LogLevelNone},
} }
for idx := range tests { for idx := range tests {