sphireinc / Mantis

Sphire Mantis is a broadly featured Go helper library with standalone packages
https://sphireinc.github.io/Mantis/
MIT License
4 stars 2 forks source link

Bump golang.org/x/sys from 0.0.0-20220227234510-4e6760a101f9 to 0.1.0 #6

Closed dependabot[bot] closed 4 months ago

dependabot[bot] commented 1 year ago

Bumps golang.org/x/sys from 0.0.0-20220227234510-4e6760a101f9 to 0.1.0.

Commits


Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/sphireinc/Mantis/network/alerts).

Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

github-actions[bot] commented 1 year ago

⚠ gocyclo failed (.)

13 function(s) exceeding a complexity of 15

Show Detail ``` flag provided but not defined: -total Calculate cyclomatic complexities of Go functions. Usage: gocyclo [flags] ... Flags: -over N show functions with complexity > N only and return exit code 1 if the set is non-empty -top N show the top N most complex functions only -avg, -avg-short show the average complexity over all functions; the short option prints the value without a label -ignore REGEX exclude files matching the given regular expression The output fields for each line are: ```
github-actions[bot] commented 1 year ago

⚠ goimports failed (.)

aws/aws.go ```diff } // New creates a new AWS config using the context and region specified -// If you want an empty context, set ctx to context.TODO() -// region should be an AWS region, like "us-west-2" +// +// If you want an empty context, set ctx to context.TODO() +// region should be an AWS region, like "us-west-2" func New(ctx context.Context, region string) *AWS { // Using the SDK's default configuration, loading additional config // and credentials values from the environment variables, shared ```
cache/memorycache_test.go ```diff import ( "fmt" - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/stretchr/testify/assert" ) const loop int = 1000 ```
data/data.go ```diff // Exists determines whether a given Path, File, or Directory exists // use constants: -// Path int = iota -// File -// Directory +// +// Path int = iota +// File +// Directory func Exists(path string, pathType int) (bool, error) { fileInfo, err := os.Stat(path) ```
database/mysql.go ```diff } // SelectOne single result, stored within arg:into -// country := Country{} -// country, err := db.Select(&country, "SELECT * FROM countries WHERE name='Germany' ORDER BY name ASC") +// +// country := Country{} +// country, err := db.Select(&country, "SELECT * FROM countries WHERE name='Germany' ORDER BY name ASC") func (m *MySQL) SelectOne(into any, query string, args ...any) (any, error) { if !m.Connected { return into, errors.New("not connected") } // InsertOne one struct into a named query using sqlx standards -// person := Person{ FirstName: "Ardie" } -// lastInsertId, err = db.NamedExec(`INSERT INTO persons (first_name) VALUES (:first_name)`, person) +// +// person := Person{ FirstName: "Ardie" } +// lastInsertId, err = db.NamedExec(`INSERT INTO persons (first_name) VALUES (:first_name)`, person) func (m *MySQL) InsertOne(namedQuery string, insertStruct any) (int64, error) { if !m.Connected { return -1, errors.New("not connected") } // UpdateOne performs an update of one record -// persons := Person{ FirstName: "Ardie" } -// err = db.NamedExec(`UPDATE persons SET first_name=:first_name`, persons) +// +// persons := Person{ FirstName: "Ardie" } +// err = db.NamedExec(`UPDATE persons SET first_name=:first_name`, persons) func (m *MySQL) UpdateOne(namedQuery string, updateStruct any) (int64, error) { if !m.Connected { return -1, errors.New("not connected") } // DeleteOne performs a deletion -// persons := Person{Id: 0} -// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) +// +// persons := Person{Id: 0} +// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) func (m *MySQL) DeleteOne(namedQuery string, deleteStruct any) error { _, err := m.Connection.NamedExec(namedQuery, deleteStruct) return err } // Delete performs a deletion -// persons := []Person{ -// {Id: 0}, -// {Id: 1}, -// } -// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) +// +// persons := []Person{ +// {Id: 0}, +// {Id: 1}, +// } +// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) func (m *MySQL) Delete(namedQuery string, deleteStructs any) (int64, error) { results, err := m.Connection.NamedExec(namedQuery, deleteStructs) if err != nil { ```
errors/error.go ```diff // New creates a new errors instance // Usage: -// err = New(100, "%v is %v years old", []any{"Kim", 22}) -// - or without args - -// err := New(100, "some message", nil) +// +// err = New(100, "%v is %v years old", []any{"Kim", 22}) +// - or without args - +// err := New(100, "some message", nil) func New(code int32, message string, args []any) *Errors { if len(args) > 0 { message = fmt.Sprintf(message, args...) ```
validation/numbers_test.go ```diff import ( "fmt" - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/stretchr/testify/assert" ) func TestIsIntStr(t *testing.T) { ```
validation/others_test.go ```diff package validation import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestIsJSON(t *testing.T) { ```
validation/password_test.go ```diff package validation import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestIsStrongPassword(t *testing.T) { ```
validation/string_test.go ```diff package validation import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestIsAllUpper(t *testing.T) { ```
validation/validation_test.go ```diff package validation import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestContainsChinese(t *testing.T) { ```
validation/web_test.go ```diff package validation import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestIsPort(t *testing.T) { ```
github-actions[bot] commented 1 year ago

⚠ ineffassign failed (.)

/github/workspace/cache/memorycache.go:67:2: ineffectual assignment to status
/github/workspace/cache/memorycache.go:67:2: ineffectual assignment to status
github-actions[bot] commented 1 year ago

⚠ gofmt failed (.)

aws/aws.go ```diff } // New creates a new AWS config using the context and region specified -// If you want an empty context, set ctx to context.TODO() -// region should be an AWS region, like "us-west-2" +// +// If you want an empty context, set ctx to context.TODO() +// region should be an AWS region, like "us-west-2" func New(ctx context.Context, region string) *AWS { // Using the SDK's default configuration, loading additional config // and credentials values from the environment variables, shared ```
data/data.go ```diff // Exists determines whether a given Path, File, or Directory exists // use constants: -// Path int = iota -// File -// Directory +// +// Path int = iota +// File +// Directory func Exists(path string, pathType int) (bool, error) { fileInfo, err := os.Stat(path) ```
database/mysql.go ```diff } // SelectOne single result, stored within arg:into -// country := Country{} -// country, err := db.Select(&country, "SELECT * FROM countries WHERE name='Germany' ORDER BY name ASC") +// +// country := Country{} +// country, err := db.Select(&country, "SELECT * FROM countries WHERE name='Germany' ORDER BY name ASC") func (m *MySQL) SelectOne(into any, query string, args ...any) (any, error) { if !m.Connected { return into, errors.New("not connected") } // InsertOne one struct into a named query using sqlx standards -// person := Person{ FirstName: "Ardie" } -// lastInsertId, err = db.NamedExec(`INSERT INTO persons (first_name) VALUES (:first_name)`, person) +// +// person := Person{ FirstName: "Ardie" } +// lastInsertId, err = db.NamedExec(`INSERT INTO persons (first_name) VALUES (:first_name)`, person) func (m *MySQL) InsertOne(namedQuery string, insertStruct any) (int64, error) { if !m.Connected { return -1, errors.New("not connected") } // UpdateOne performs an update of one record -// persons := Person{ FirstName: "Ardie" } -// err = db.NamedExec(`UPDATE persons SET first_name=:first_name`, persons) +// +// persons := Person{ FirstName: "Ardie" } +// err = db.NamedExec(`UPDATE persons SET first_name=:first_name`, persons) func (m *MySQL) UpdateOne(namedQuery string, updateStruct any) (int64, error) { if !m.Connected { return -1, errors.New("not connected") } // DeleteOne performs a deletion -// persons := Person{Id: 0} -// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) +// +// persons := Person{Id: 0} +// err = db.NamedExec(`DELETE FROM persons WHERE id=:id`, persons) func (m *MySQL) DeleteOne(namedQuery string, deleteStruct any) error { _, err := m.Connection.NamedExec(namedQuery, deleteStruct) return err ```
errors/error.go ```diff // New creates a new errors instance // Usage: -// err = New(100, "%v is %v years old", []any{"Kim", 22}) -// - or without args - -// err := New(100, "some message", nil) +// +// err = New(100, "%v is %v years old", []any{"Kim", 22}) +// - or without args - +// err := New(100, "some message", nil) func New(code int32, message string, args []any) *Errors { if len(args) > 0 { message = fmt.Sprintf(message, args...) ```
github-actions[bot] commented 1 year ago

⚠ errcheck failed (.)

error: failed to check packages: errors while loading package github.com/sphireinc/mantis/stripe: [/github/workspace/stripe/customer.go:43:13: cannot use stripe.String(customerID) (value of type *string) as string value in struct literal /github/workspace/stripe/payment.go:28:12: sc.CustomerSources undefined (type *client.API has no field or method CustomerSources) /github/workspace/stripe/payment.go:41:16: cannot use src (variable of type *"github.com/stripe/stripe-go/v72".Source) as *"github.com/stripe/stripe-go/v72".SourceParams value in struct literal]
github-actions[bot] commented 1 year ago

⚠ vet failed (.)

# github.com/sphireinc/mantis/stripe
vet: stripe/customer.go:43:13: cannot use stripe.String(customerID) (value of type *string) as string value in struct literal
github-actions[bot] commented 1 year ago

⚠ shadow failed (.)

# github.com/sphireinc/mantis/stripe
shadow: stripe/customer.go:43:13: cannot use stripe.String(customerID) (value of type *string) as string value in struct literal
github-actions[bot] commented 1 year ago

⚠ staticcheck failed (.)

-: # github.com/sphireinc/mantis/stripe
stripe/customer.go:43:13: cannot use stripe.String(customerID) (value of type *string) as string value in struct literal
stripe/payment.go:28:12: sc.CustomerSources undefined (type *client.API has no field or method CustomerSources)
stripe/payment.go:41:16: cannot use src (variable of type *"github.com/stripe/stripe-go/v72".Source) as *"github.com/stripe/stripe-go/v72".SourceParams value in struct literal (compile)
geo/conversion.go:5:6: func decimalToDMS is unused (U1000)
geo/conversion.go:18:6: func dmsToDecimal is unused (U1000)
geo/geo.go:18:6: func boundingBox is unused (U1000)
geo/geo.go:44:6: func haversineDistance is unused (U1000)
geo/geo.go:65:6: func midpoint is unused (U1000)
geo/geo.go:88:6: func initialBearing is unused (U1000)
math/circle.go:5:6: func areaOfCircle is unused (U1000)
math/circle.go:9:6: func circumferenceOfCircle is unused (U1000)
math/cone.go:5:6: func volumeOfCone is unused (U1000)
math/cylinder.go:5:6: func volumeOfCylinder is unused (U1000)
math/cylinder.go:9:6: func surfaceAreaOfCylinder is unused (U1000)
math/fibonacci.go:5:6: func isFibonacci is unused (U1000)
math/fibonacci.go:12:6: func isPerfectSquare is unused (U1000)
math/fibonacci.go:17:6: func fibonacci is unused (U1000)
math/math.go:3:6: func square is unused (U1000)
math/math.go:7:6: func isEven is unused (U1000)
math/math.go:11:6: func isOdd is unused (U1000)
math/math.go:15:6: func isPrime is unused (U1000)
math/math.go:30:6: func gcd is unused (U1000)
math/math.go:39:6: func lcm is unused (U1000)
math/math.go:43:6: func factorial is unused (U1000)
math/math.go:50:6: func firstNPrimes is unused (U1000)
math/rectangle.go:3:6: func areaOfRectangle is unused (U1000)
math/rectangle.go:7:6: func perimeterOfRectangle is unused (U1000)
math/slice.go:5:6: func sumIntSlice is unused (U1000)
math/slice.go:13:6: func meanFloatSlice is unused (U1000)
math/slice.go:21:6: func maxIntSlice is unused (U1000)
math/slice.go:31:6: func minIntSlice is unused (U1000)
math/slice.go:42:6: func dotProduct is unused (U1000)
math/slice.go:55:6: func euclideanDistance is unused (U1000)
math/slice.go:67:6: func uniqueIntSlice is unused (U1000)
math/sphere.go:5:6: func volumeOfSphere is unused (U1000)
math/sphere.go:9:6: func surfaceAreaOfSphere is unused (U1000)
math/temperature.go:3:6: func fahrenheitToCelsius is unused (U1000)
math/temperature.go:7:6: func celsiusToFahrenheit is unused (U1000)
math/trapezoid.go:3:6: func areaOfTrapezoid is unused (U1000)
math/triangle.go:5:6: func areaOfTriangle is unused (U1000)
math/triangle.go:9:6: func perimeterOfTriangle is unused (U1000)
math/triangle.go:13:6: func hypotenuseLength is unused (U1000)
string/rune.go:3:6: func countRune is unused (U1000)
string/string.go:3:6: func reverseString is unused (U1000)
string/string.go:14:6: func isPalindrome is unused (U1000)

Checks Document