Asim Aslam
3e885308a0
lint: clear the golangci-lint backlog and enforce a blocking lint in CI ( #2995 )
...
Fixes #2988 . Brings 'golangci-lint run ./...' to zero issues (was ~373):
- errcheck: explicitly ignore fire-and-forget calls with '_ =' (and a small
errcheck.exclude-functions list for response writes — json Encoder.Encode,
http ResponseWriter.Write, fmt.Fprint*); genuine cases handled.
- unused: remove dead code (unexported decls and dead test helpers) and the
imports they orphaned.
- staticcheck: ST1005 error strings, ST1016 receiver names, S1000/S1017/S1019/
S1023 simplifications, SA4004/SA4006/SA4010 dead code, SA1021 net.IP.Equal,
SA6002 (store *[]byte in sync.Pool).
- govet: fix a context leak (lostcancel) in internal/util/mdns and move
t.Fatal/Fatalf out of goroutines (testinggoroutine) in tests.
- ineffassign, unconvert: mechanical fixes.
CI: the Lint workflow now runs a blocking full-tree 'golangci-lint run' on
pushes and PRs (dropped only-new-issues now that the tree is clean).
Verified: go build, go vet, test compilation, and unit tests for the
behaviourally-touched packages all pass.
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Co-authored-by: Claude <noreply@anthropic.com >
2026-06-22 18:51:30 +01:00
Asim Aslam
c7657f73f4
Refactor agent plan storage, update docs, and release v6 ( #2977 )
...
goreleaser / goreleaser (push) Has been cancelled
* test(harness): read agent plan from the scoped store
The store-scoping change moved an agent's plan from the default table
key agent/{name}/plan to its own table (database "agent", table {name},
key "plan"). The plan-delegate harness tests still read the old key and
failed with 'not found'; read through store.Scope(mem, "agent", name)
like the agent does.
* docs: orient agents-first across README, landing, and docs overview
Lead with agents (then services and flows), surface MCP + A2A as the
interop story, and frame agents as services. Landing hero and feature
grid reordered agents-first with an A2A gateway card.
* v6: module path go-micro.dev/v6, TLS secure by default, NewService
Cut v6. Three breaking changes, bundled so the major bump is paid once:
- Module path go-micro.dev/v5 -> go-micro.dev/v6 across all imports + go.mod.
- TLS verification on by default (was off). MICRO_TLS_SECURE removed;
MICRO_TLS_INSECURE=true opts out for self-signed/dev.
- micro.NewService(name, opts...) is the canonical service constructor,
symmetric with NewAgent/NewFlow; micro.New kept as a deprecated alias;
the old name-less NewService(opts...) removed. Generators emit NewService.
Also ports the JWT auth token provider in-module (go-micro.dev/v6/auth/jwt/token
on golang-jwt/jwt/v5), dropping the v5-pinned github.com/micro/plugins/v5/auth/jwt
and the deprecated dgrijalva/jwt-go.
Docs/README/landing updated to v6 and @latest; v5->v6 migration guide added;
CHANGELOG cut as [6.0.0]. Blog posts left at their historical versions.
---------
Co-authored-by: Claude <noreply@anthropic.com >
2026-06-18 11:55:35 +01:00
asim
a38d7df106
go fmt
2026-02-04 14:37:40 +00:00
Copilot
4ba40ea579
Replace custom logger with log/slog ( #2844 )
...
* Initial plan
* Replace custom logger with slog implementation
Co-authored-by: asim <17530+asim@users.noreply.github.com >
* Fix linting issues in slog implementation
Co-authored-by: asim <17530+asim@users.noreply.github.com >
* Address code review feedback: fix locking and use copyFields
Co-authored-by: asim <17530+asim@users.noreply.github.com >
* Restore debug/log buffer functionality with slog
Co-authored-by: asim <17530+asim@users.noreply.github.com >
* Address code review feedback: extract helper and remove dead code
Co-authored-by: asim <17530+asim@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: asim <17530+asim@users.noreply.github.com >
2026-02-03 15:55:46 +00:00
asim
610c00859f
v5
2024-06-04 21:40:43 +01:00
Lukasz Raczylo
a7522e7d6c
fix: struct field alignment ( #2632 )
2023-04-26 02:16:34 +02:00
David Brouwer
a3980c2308
feat: add test framework & refactor RPC server ( #2579 )
...
Co-authored-by: Rene Jochum <rene@jochum.dev >
2022-10-20 13:00:50 +02:00
David Brouwer
85c0b0b8eb
fix: some linting issues ( #2563 )
2022-09-30 16:27:07 +02:00
Mohamed MHAMDI
1db36357d5
feat(logger): add logger option to all micro components (override DefaultLogger) closes #2556 ( #2559 )
...
Run tests / Test repo (push) Has been cancelled
* feat(logger): add logger option to all components
* fix: refactor api/rpc.go
* fix: refactor api/stream.go
* fix: api/options.go comment
* fix(logger): do not use logger.Helper internally
* fix(logger): fix comments
* fix(logger): use level.Enabled method
* fix: rename mlogger to log
* fix: run go fmt
* fix: log level
* fix: factories
Co-authored-by: Mohamed MHAMDI <mmhamdi@hubside.com >
Co-authored-by: Davincible <david.brouwer.99@gmail.com >
2022-09-29 16:44:53 +02:00
Asim Aslam
1cd7cfaa6c
go-micro.dev/v4 ( #2305 )
Run tests / Test repo (push) Has been cancelled
2021-10-12 12:55:53 +01:00
Arsen
3b60db0dcd
logger helper: add "inject" method, to make a pair with "extract" ( #2283 )
2021-09-23 16:48:08 +01:00
Arsen
916ed6b8ee
logger: caller's skip correction ( #2280 )
2021-09-22 09:01:03 +01:00
gregkv
00d819a199
Remove fields map from Helper, add Extract method and fix for defaultLogger.Fields ( #2274 )
2021-09-19 10:40:09 +01:00
JeffreyBool
acc3f5479f
fix service default logger ( #2171 )
...
* Update http.go
Exit before deregister is executed
* Create http.go
Exit before deregister is executed
* Solve the problem that the resources have not been fully released due to early exit
* Optimize some code
* Optimize some code
* Optimize some code
* fix service default logger
2021-05-23 08:38:20 +01:00
Asim Aslam
d94936f6c9
v3 ( #2104 )
...
* v3
* revert plugins
* fixup some issues
2021-01-20 13:54:31 +00:00
johnson
cc79692d68
make caller filepath package/file style
...
this code is from zap
https://github.com/uber-go/zap/blob/9a9fa7d4b5f07a9b634983678a65b5525f81e58b/zapcore/entry.go#L101
2020-05-26 14:33:56 +08:00
Janos Dobronszki
434997e676
Display only logging file name as opposed to path in logs ( #1580 )
2020-04-27 09:55:50 +01:00
Janos Dobronszki
ec44b67e9f
Fixing log file path in logs ( #1578 )
2020-04-27 09:36:09 +01:00
Vasiliy Tolstov
980b772801
fix races in web and logger ( #1576 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-04-26 17:41:36 +03:00
Vasiliy Tolstov
a22da39e1c
logger: add caller info to default implementation ( #1575 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-04-26 17:11:53 +03:00
Vasiliy Tolstov
beaa434610
logger: fix reading env var ( #1414 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-25 22:00:43 +00:00
Vasiliy Tolstov
3543b275e0
fix log level helper ( #1342 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-13 17:36:42 +03:00
Vasiliy Tolstov
7b385bf163
minimize allocations in logger and tunnel code ( #1323 )
...
* logs alloc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* fix allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* tunnel allocs
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* try to fix tunnel
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* cache cipher for send
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* more logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-11 17:55:39 +00:00
Vasiliy Tolstov
241614ff68
add helper function to determine logger level ( #1321 )
...
* add helper function to determine logger level
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-09 23:43:05 +03:00
ben-toogood
e3ce45495a
os.Exit on log.Fatal ( #1316 )
...
* os.Exit on log.Fatal
* Fix TestOptions
Co-authored-by: Ben Toogood <ben@micro.mu >
2020-03-09 09:23:42 +00:00
ben-toogood
9386f36a13
Exit on log.Fatal ( #1297 )
2020-03-04 13:46:01 +00:00
Vasiliy Tolstov
89ba602e17
logger fixes and improvements ( #1285 )
...
* fix helper fields
* add metadata output for default logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-03 11:07:37 +03:00
Vasiliy Tolstov
b555269b1b
copy fields in helper ( #1281 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-03-02 14:18:36 +00:00
Vasiliy Tolstov
6b8930a960
add new helper method to logger ( #1273 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-29 00:39:41 +00:00
Vasiliy Tolstov
d0a978bd50
redesign logger ( #1272 )
...
* redesign logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-29 03:31:59 +03:00
Vasiliy Tolstov
64a5ce9607
various fixes ( #1267 )
...
* logger: remove Panic log level
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* server/grpc: add missing Unlock in Subscribe error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* server: minor code change
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* server/grpc: extend test suite with pub/sub testing
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* server/grpc: fix invalid check and allow subscriber error to be returned
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* server/grpc: add pubsub tests
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* client/grpc: check for nil req/rsp
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-26 18:34:40 +00:00
Eric
53c3bff819
add Panic & Panicf to logger ( #1258 )
...
* add Panic & Panicf to logger
2020-02-25 17:44:29 +03:00
Vasiliy Tolstov
cf0b39eaac
logger fixes ( #1244 )
...
* logger: fix race conditions
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* restore util/log for compatibility
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-24 13:07:40 +00:00
Vasiliy Tolstov
117f56ebf7
prune util/log and user logger ( #1237 )
...
* prune util/log and user logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* plaintext logger
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
* add newline
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-23 13:45:20 +00:00
Asim Aslam
116855572b
Add log level helper funtions ( #1229 )
2020-02-21 08:43:23 +00:00
Asim Aslam
ee977acfef
strip SetGlobalLevel ( #1228 )
2020-02-21 08:28:21 +00:00
Sumanth Chinthagunta
3fa7c26946
logger with helper methods ( #1216 )
...
* support unix daemon socket
* refactor(logger): logger fields changed to map[string]interface{}
* improvement(logger): adding string to Level Parser
* improvement(logger): rename ParseLevel to GetLevel
* refactor(logger): adding basic logger
adding micro default logger, and refactor logger interface
* refactor(logger): moved basic logger to top level package
* refactor(logger): adding default logger
2020-02-21 07:57:59 +00:00
Asim Aslam
78df154a4d
move log level setting to option ( #1222 )
2020-02-20 08:26:12 +00:00
Sumanth Chinthagunta
fc5339a368
[W.I.P] refactor(logger): logger fields changed to map[string]interface{} ( #1198 )
...
* support unix daemon socket
* refactor(logger): logger fields changed to map[string]interface{}
* improvement(logger): adding string to Level Parser
* improvement(logger): rename ParseLevel to GetLevel
2020-02-15 18:19:28 +00:00
Vasiliy Tolstov
c706afcf04
logger helper to pass down it via context ( #1180 )
...
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org >
2020-02-09 21:26:46 +00:00
Asim Aslam
0e9b4c26a4
import with braces
2020-02-06 21:39:08 +00:00
Asim Aslam
d40b13a045
mux to mtx
2020-02-06 21:37:17 +00:00
Asim Aslam
4079b22c1e
reorder logger methods
2020-02-06 21:36:33 +00:00
Shu xian
fdfb2bc4c1
[WIP] logger first ( #1161 )
...
* logger first
* log->logger
* update comment
* add context in Options
* add Fields
* remove logfi
* add field encode
* add common Field Types
* update logger field
2020-02-06 21:35:46 +00:00