arquivei / foundationkit Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
One of the most recent releases of go added a new way to handle os signals: https://pkg.go.dev/os/signal#NotifyContext
We could refactor the app`s signal handling to use this and possibly simplify the code.
The SetupLogger function could receive a context and return this context with the initialized logger.
If you would like to help out and at the same time get acquainted with the project, please feel free to add more tests and test cases where ever is possible.
MustNew
it not using httpClient
in:
// MustNew returns a new valid schemaregistry.Repository but panics in case on an error
func MustNew(url string, httpClient *http.Client) schemaregistry.Repository {
const op = errors.Op("implschemaregistry.MustNew")
if url == "" {
panic(errors.E(op, "missing url"))
}
if !strings.HasSuffix(url, "/") {
url += "/"
}
return &repository{
getSchemaByIDURL: url + "schemas/ids/%d",
getIDBySchemaURL: url + "subjects/%s",
}
}
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
cloud.google.com/go/logging
, github.com/omeid/uconfig
, github.com/prometheus/client_golang
, github.com/splitio/go-client/v6
, go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux
, go.opentelemetry.io/otel
, go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
, go.opentelemetry.io/otel/sdk
, go.opentelemetry.io/otel/trace
, golang.org/x/net
).github/workflows/go.yml
actions/checkout v4
actions/setup-go v5
actions/checkout v4
actions/setup-go v5
actions/checkout v4
actions/setup-go v5
.github/workflows/golangci-lint.yml
actions/setup-go v5
actions/checkout v4
golangci/golangci-lint-action v3
.github/workflows/govulcheck.yml
golang/govulncheck-action v1
.github/workflows/stale.yml
actions/stale v9
go.mod
go 1.21
cloud.google.com/go/logging v1.8.1
contrib.go.opencensus.io/exporter/stackdriver v0.13.14
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1
github.com/go-logr/zerologr v1.2.3
github.com/gorilla/mux v1.8.1
github.com/hamba/avro/v2 v2.18.0
github.com/oklog/ulid/v2 v2.1.0
github.com/omeid/uconfig v1.2.0
github.com/prometheus/client_golang v1.17.0
github.com/rs/zerolog v1.31.0
github.com/splitio/go-client/v6 v6.5.0
github.com/stretchr/testify v1.8.4
go.opencensus.io v0.24.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.46.1
go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/trace v1.21.0
golang.org/x/net v0.19.0
Allow for multiple individual monitors
Some idea for the future. Create the tye Labes
, just like the http has the Values
type: https://golang.org/pkg/net/url/#Values
Originally posted by @rjfonseca in https://github.com/_render_node/MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1NTYxNTkzMw==/comments/review_comment
When a panic is not handled by the project, the metrics middleware will capture it and logs as panic: panic message here
. But we lost the stacktrace and this makes it harder to investigate the problem.
We need a stacktrace in panics logs.
How to capture a stacktrace in recover:
https://stackoverflow.com/questions/52103182/how-to-get-the-stacktrace-of-a-panic-and-store-as-a-variable
Seria interessante uma outra PR adicionando um projetinho de exemplo, talvez em pasta chamada Examples
Originally posted by @eric-reis in #15
I'm using Go 1.19, I cloned the project and ran the command to run the app example:
go run ./app/examples/servefiles/ -log-human -log-level=debug
I got this error:
build github.com/arquivei/foundationkit/app/examples/servefiles: cannot load io/fs: malformed module path "io/fs": missing dot in first path element
I suspected an error with an import, so I ran go mod tidy and got this error:
github.com/arquivei/foundationkit/avroutil/example imports
embed: malformed module path "embed": missing dot in first path element
github.com/arquivei/foundationkit/gokitmiddlewares/metricsmiddleware/v2/example imports
github.com/prometheus/client_golang/prometheus imports
runtime/metrics: malformed module path "runtime/metrics": missing dot in first path element
github.com/arquivei/foundationkit/trace imports
contrib.go.opencensus.io/exporter/stackdriver imports
go.opencensus.io/plugin/ochttp tested by
go.opencensus.io/plugin/ochttp.test imports
golang.org/x/net/http2 imports
io/fs: malformed module path "io/fs": missing dot in first path element
Does anyone know what I may be doing wrong?
In the future we will need to add a .Time()
function so we can get the time part from the request-id
Originally posted by @rjfonseca in #18
Add an github action that tests the code.
If you would like to help out and at the same time get acquainted with the project, please feel free update our documentation (using the godoc format) to be more clear and/or add more examples.
A good way to think of it is to ask yourself: Why someone should use this function and write down the answer as a godoc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.