• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gopher-fleece / gleece / 15284258021
86%

Build:
DEFAULT BRANCH: main
Ran 27 May 2025 07:45PM UTC
Jobs 1
Files 45
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 May 2025 07:43PM UTC coverage: 86.321% (+0.5%) from 85.831%
15284258021

push

github

web-flow
BREAKING - Adding support for Receiver Context Injection (#46)

This P.R adds support for context injection to Gleece authentication, middlewares and controllers.

Example:

```go
// @Method(POST)
// @Route(/context-and-route-param/{id})
// @Path(id)
func (ec *ContextController) MethodWithContext(ctx context.Context, id string) error {
	return nil
}
```

In this example, `ctx` will be the Go Context encapsulated by the underlying router's own Context.

### Controllers:

Using context injection requires no effort from users - simply add a `context.Context` parameter to whichever method/s require it.
The underlying generated code will automatically deliver it.

**Please note the following:**
* Context imports must be explicit (i.e., `context.Context`). **Dot imports or aliases are *not* supported.**
* Context parameters may appear multiple times and in any order. We recommend picking a convention and sticking to it.

--------

### Authentication/Middlewares:

**Please note this is a BREAKING change**.

Authentication handler and middlewares have had their signature updated to receive and return a Context.
Users can use the context as they see fit.

If the function (be it authentication or middleware) then returns a context, it will **replace** the router's request context, allowing users to effectively inject metadata into the session.


### Addendum

* BREAKING - Minor changes to several template variable names

83 of 95 new or added lines in 7 files covered. (87.37%)

1 existing line in 1 file now uncovered.

3925 of 4547 relevant lines covered (86.32%)

283.16 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
87.44
-0.39% generator/swagen/swagen31/paths_generatorv31.go
11
76.43
0.4% extractor/visitors/controller/route.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
76.43
0.4% extractor/visitors/controller/route.go
Jobs
ID Job ID Ran Files Coverage
1 15284258021.1 27 May 2025 07:45PM UTC 45
86.32
GitHub Action Run
Source Files on build 15284258021
  • Tree
  • List 45
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c04a063a on github
  • Prev Build on main (#15195999818)
  • Next Build on main (#15293779714)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc