Repository Analysis

gofr-dev/gofr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.

0.9 Likely human-written View on GitHub
0.9
Adjusted Score
0.9
Raw Score
100%
Time Factor
2026-05-26
Last Push
21,408
Stars
Go
Language
190,487
Lines of Code
813
Files
126
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 2MEDIUM 14LOW 110

Pattern Findings

126 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block80 hits · 78 pts
SeverityFileLineSnippet
LOWdocs/datasources/scylladb/page.md21with ScyllaDB. Any driver implementation that adheres to this interface can be integrated into GoFr using the
LOWdocs/datasources/opentsdb/page.md21Implementations adhering to the `OpenTSDB` interface can be registered with `app.AddOpenTSDB()`,
LOWdocs/datasources/opentsdb/page.md41 //
LOWdocs/datasources/opentsdb/page.md61 // - res: A pointer to QueryLastResponse, where the server's response will be stored.
LOWdocs/datasources/opentsdb/page.md81 // Parameters:
LOWexamples/http-server/main_test.go1package main
LOWexamples/using-http-auth-middleware/ReadMe.md41a := gofr.New()
LOWexamples/using-http-auth-middleware/main_test.go61 assert.Equal(t, http.StatusOK, resp.StatusCode)
LOWexamples/using-http-auth-middleware/main_test.go81// serverConfigs := testutil.NewServerConfigs(t)
LOWexamples/using-http-auth-middleware/main_test.go101//
LOWexamples/using-http-auth-middleware/main_test.go121// setupBasicAuth(app)
LOWexamples/using-http-auth-middleware/main_test.go141// resp, err := netClient.Do(req)
LOW.github/workflows/website-prod.yml81 TAG=${GITHUB_REF#refs/tags/}
LOW.qlty/qlty.toml1# This file was automatically generated by `qlty init`.
LOWpkg/gofr/handler.go101// serveInline runs the user handler in the calling goroutine. Used when
LOWpkg/gofr/gofr.go241 options = append([]service.Options{service.WithAttributes(map[string]string{"name": serviceName})}, options...)
LOWpkg/gofr/gofr.go421// The hook function receives a Context that provides access to the application's
LOWpkg/gofr/rbac.go1package gofr
LOWpkg/gofr/http_server_test.go241
LOWpkg/gofr/metrics/register.go161//
LOWpkg/gofr/metrics/register.go181 }
LOWpkg/gofr/metrics/exporters/exporter.go41//
LOWpkg/gofr/metrics/exporters/exporter.go61//
LOWpkg/gofr/datasource/clickhouse/clickhouse.go141// Example Usages:
LOWpkg/gofr/datasource/clickhouse/interface.go1// Package clickhouse provides functionalities for interacting with a Clickhouse database.
LOWpkg/gofr/datasource/clickhouse/interface.go21 //
LOWpkg/gofr/datasource/clickhouse/interface.go41 //
LOWpkg/gofr/datasource/file/interface.go81
LOWpkg/gofr/datasource/file/row_reader.go21 logger datasource.Logger
LOWpkg/gofr/datasource/file/common_fs.go21 errChDirNotSupported = errors.New("changing directory is not supported in cloud storage")
LOWpkg/gofr/datasource/file/s3/fs.go261 size: *res.ContentLength,
LOWpkg/gofr/datasource/file/sftp/file.go81type jsonReader struct {
LOWpkg/gofr/datasource/file/gcs/storage_adapter.go481}
LOWpkg/gofr/datasource/arangodb/arango_document.go21//
LOWpkg/gofr/datasource/arangodb/arango.go161// - dbName: Name of the ArangoDB database where the query will be executed.
LOWpkg/gofr/datasource/arangodb/arango.go181// - allowRetry (bool)
LOWpkg/gofr/datasource/arangodb/arango.go201// - forceOneShardAttributeValue (*string)
LOWpkg/gofr/datasource/arangodb/arango.go221// "options": map[string]any{
LOWpkg/gofr/datasource/opentsdb/preprocess.go21 // The data type can only be string, int, or int64.
LOWpkg/gofr/datasource/opentsdb/preprocess.go41 // An optional value is used to show whether the query should retrieve global
LOWpkg/gofr/datasource/opentsdb/preprocess.go61// [OpenTSDB Official Docs]: http://opentsdb.net/docs/build/html/api_http/query/index.html.
LOWpkg/gofr/datasource/opentsdb/preprocess.go81 Rate bool `json:"rate,omitempty"`
LOWpkg/gofr/datasource/opentsdb/preprocess.go261 // An optional flag is used to determine whether or not to resolve the TSUIDs of results to
LOWpkg/gofr/datasource/opentsdb/response.go81 Metric string `json:"metric"`
LOWpkg/gofr/datasource/opentsdb/response.go101 // data points with timestamps out of order.
LOWpkg/gofr/datasource/opentsdb/opentsdb.go81
LOWpkg/gofr/datasource/pubsub/kafka/kafka.go61 reader map[string]Reader
LOWpkg/gofr/datasource/pubsub/kafka/helper.go101// ensureConnected verifies the admin connection is alive and, if not, makes a
LOWpkg/gofr/datasource/sql/db.go201// 2. Get a single object from database
LOWpkg/gofr/rbac/config.go41 Name string `json:"name" yaml:"name"`
LOWpkg/gofr/rbac/config.go61 // - "/api/{resource}" (single-level wildcard: matches /api/users, /api/posts)
LOWpkg/gofr/grpc/rate_limiter.go1// Package grpc provides gRPC-related additions within the GoFr framework.
LOWpkg/gofr/container/container_test.go541 require.NoError(t, err)
LOWpkg/gofr/container/datasources.go41// Deprecated: Cassandra interface is deprecated and will be removed in future releases, users must use CassandraWithCon
LOWpkg/gofr/container/datasources.go61 // err := c.Query(&u, "SELECT * FROM users WHERE id=?", 1)
LOWpkg/gofr/container/datasources.go81 //
LOWpkg/gofr/container/datasources.go101 // u := user{}
LOWpkg/gofr/container/datasources.go121
LOWpkg/gofr/container/datasources.go141 // Deprecated: ExecuteBatch method is deprecated and will be removed in future releases, users must use ExecuteBatchWit
LOWpkg/gofr/container/datasources.go441 // - ctx: Context for request cancellation and timeouts
20 more matches not shown…
Fake / Example Data25 hits · 34 pts
SeverityFileLineSnippet
LOWdocs/advanced-guide/authentication/page.md140- **Subject (`sub`)**: `jwt.WithSubject("user@example.com")`
LOWpkg/gofr/crud_handlers_test.go315 mockResp: sqlmock.NewRows([]string{"id", "name", "is_employed"}).AddRow(1, "John Doe", true).AddRow(2, "Jane Doe", f
LOWpkg/gofr/crud_handlers_test.go315 mockResp: sqlmock.NewRows([]string{"id", "name", "is_employed"}).AddRow(1, "John Doe", true).AddRow(2, "Jane Doe", f
LOWpkg/gofr/crud_handlers_test.go317 expectedResp: []any{&userEntity{ID: 1, Name: "John Doe", IsEmployed: true},
LOWpkg/gofr/crud_handlers_test.go318 &userEntity{ID: 2, Name: "Jane Doe", IsEmployed: false}},
LOWpkg/gofr/crud_handlers_test.go405 mockRow: sqlmock.NewRows([]string{"id", "name", "is_employed"}).AddRow(1, "John Doe", true),
LOWpkg/gofr/crud_handlers_test.go407 expectedResp: &userEntity{ID: 1, Name: "John Doe", IsEmployed: true},
LOWpkg/gofr/context_test.go327 "name": "John Doe",
LOWpkg/gofr/datasource/kv-store/dynamodb/dynamo_test.go334 "name": "John Doe",
LOWpkg/gofr/datasource/kv-store/dynamodb/dynamo_test.go342 assert.Contains(t, jsonStr, "John Doe")
LOWpkg/gofr/datasource/kv-store/dynamodb/dynamo_test.go357 jsonStr := `{"name":"John Doe","age":30,"email":"john@example.com"}`
LOWpkg/gofr/datasource/kv-store/dynamodb/dynamo_test.go363 assert.Equal(t, "John Doe", result["name"])
LOWpkg/gofr/datasource/kv-store/dynamodb/dynamo_test.go369 invalidJSON := `{"name":"John Doe","age":30,"email":}`
LOWpkg/gofr/datasource/sql/query_builder_test.go25 values: []any{"John Doe", 30},
LOWpkg/gofr/datasource/sql/query_builder_test.go33 values: []any{"John Doe", 30},
LOWpkg/gofr/datasource/sql/query_builder_test.go41 values: []any{1, "John Doe"},
LOWpkg/gofr/datasource/sql/query_builder_test.go52 values: []any{1, "John Doe"},
LOWpkg/gofr/container/datasources.go80 // err := c.Exec("INSERT INTO users VALUES(1, 'John Doe')")
LOWpkg/gofr/container/datasources.go84 // name := "John Doe"
LOWpkg/gofr/container/datasources.go102 // applied, err := c.ExecCAS(&user, "INSERT INTO users VALUES(1, 'John Doe') IF NOT EXISTS")
LOWpkg/gofr/container/datasources.go129 // c.BatchQuery("INSERT INTO users VALUES(1, 'John Doe')")
LOWpkg/gofr/container/datasources.go134 // name1 := "John Doe"
LOWpkg/gofr/http/middleware/oauth_test.go65 response: jwt.MapClaims{"admin": true, "iat": 1.516239022e+09, "name": "John Doe", "sub": "1234567890"},
LOWpkg/gofr/static/swagger-ui.js1!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"fu
LOWpkg/gofr/static/swagger-ui.js1!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"fu
Decorative Section Separators9 hits · 27 pts
SeverityFileLineSnippet
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go731// ─── helpers for signed-URL tests ───────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go778// ─── parseServiceAccountCredentials ─────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go826// ─── validatePrivateKey ──────────────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go853// ─── buildSignedURLOptions ───────────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go899// ─── sanitizeContentDisposition ─────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go917// ─── rewriteSignedURLEndpoint ────────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go941// ─── NewWriterWithOptions ────────────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go1007// ─── SignedURL ───────────────────────────────────────────────────────────────
MEDIUMpkg/gofr/datasource/file/gcs/storage_adapter_test.go1118// ─── Connect with credentials caching ────────────────────────────────────────
Magic Placeholder Names2 hits · 10 pts
SeverityFileLineSnippet
HIGHdocs/guides/production-tracing/page.md87TRACER_HEADERS: "x-honeycomb-team=YOUR_API_KEY,x-honeycomb-dataset=orders"
HIGHdocs/quick-start/observability/page.md449TRACER_HEADERS="X-Honeycomb-Team=your_api_key"
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/go.yml25# Define the jobs that this workflow will run
MEDIUM.github/workflows/go.yml31 # Define a matrix strategy to test against multiple Go versions
MEDIUM.github/workflows/go.yml270 # Create a directory for coverage reports
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMpkg/gofr/datasource/pubsub/kafka/kafka_test.go780 // stays robust if the order is revisited.
MEDIUMpkg/gofr/migration/migration.go34 // ensuring the lock stays robust while still allowing fairly quick recovery if a process crashes.
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippet
LOW.github/workflows/go.yml397 # Check if any files changed
LOW.github/workflows/go.yml418 # Check if this module is not already in the list
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOWpkg/gofr/static/swagger-ui.js1!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"fu
LOWpkg/gofr/static/swagger-ui-standalone-preset.js2!function webpackUniversalModuleDefinition(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"fu
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWpkg/gofr/gofr.go426// Example usage: