Merge pull request #226 from Konstantin8105/workflow

golang: verification
This commit is contained in:
Milan Nikolic 2022-11-27 17:46:44 +01:00 committed by GitHub
commit 89845f559c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 7 deletions

View file

@ -21,3 +21,21 @@ jobs:
- name: Build - name: Build
run: go build ./... run: go build ./...
working-directory: raylib working-directory: raylib
- name: Verify dependencies
run: go mod verify
working-directory: raylib
- name: Build
run: go build -v ./...
working-directory: raylib
- name: Run go vet
run: go vet ./...
working-directory: raylib
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
working-directory: raylib
- name: Run staticcheck
run: staticcheck ./...
working-directory: raylib
- name: Run tests
run: go test -race -vet=off ./...
working-directory: raylib

View file

@ -27,7 +27,6 @@ func InitWindow(width int32, height int32, title string) {
// SetCallbackFunc - Sets callback function // SetCallbackFunc - Sets callback function
func SetCallbackFunc(func()) { func SetCallbackFunc(func()) {
return
} }
// ShowCursor - Shows cursor // ShowCursor - Shows cursor
@ -87,7 +86,6 @@ func LoadDroppedFiles() []string {
// UnloadDroppedFiles - Unload dropped filepaths // UnloadDroppedFiles - Unload dropped filepaths
func UnloadDroppedFiles() { func UnloadDroppedFiles() {
return
} }
// OpenAsset - Open asset // OpenAsset - Open asset

View file

@ -848,7 +848,7 @@ type MaterialMap struct {
Value float32 Value float32
} }
// Model, meshes, materials and animation data // Model is struct of model, meshes, materials and animation data
type Model struct { type Model struct {
// Local transform matrix // Local transform matrix
Transform Matrix Transform Matrix
@ -1195,6 +1195,7 @@ func newRenderTexture2DFromPointer(ptr unsafe.Pointer) RenderTexture2D {
return *(*RenderTexture2D)(ptr) return *(*RenderTexture2D)(ptr)
} }
// TraceLogLevel parameter of trace log message
type TraceLogLevel int type TraceLogLevel int
// Trace log level // Trace log level

View file

@ -60,7 +60,7 @@ func Vector2Negate(v Vector2) Vector2 {
return NewVector2(-v.X, -v.Y) return NewVector2(-v.X, -v.Y)
} }
// Vector2Divide - Divide vector by vector // Vector2DivideV - Divide vector by vector
func Vector2DivideV(v1, v2 Vector2) Vector2 { func Vector2DivideV(v1, v2 Vector2) Vector2 {
return NewVector2(v1.X/v2.X, v1.Y/v2.Y) return NewVector2(v1.X/v2.X, v1.Y/v2.Y)
} }
@ -174,8 +174,6 @@ func Vector3CrossProduct(v1, v2 Vector3) Vector3 {
// Vector3Perpendicular - Calculate one vector perpendicular vector // Vector3Perpendicular - Calculate one vector perpendicular vector
func Vector3Perpendicular(v Vector3) Vector3 { func Vector3Perpendicular(v Vector3) Vector3 {
result := Vector3{}
min := math.Abs(float64(v.X)) min := math.Abs(float64(v.X))
cardinalAxis := NewVector3(1.0, 0.0, 0.0) cardinalAxis := NewVector3(1.0, 0.0, 0.0)
@ -188,7 +186,7 @@ func Vector3Perpendicular(v Vector3) Vector3 {
cardinalAxis = NewVector3(0.0, 0.0, 1.0) cardinalAxis = NewVector3(0.0, 0.0, 1.0)
} }
result = Vector3CrossProduct(v, cardinalAxis) result := Vector3CrossProduct(v, cardinalAxis)
return result return result
} }