Skip to content

Commit 1dba8a8

Browse files
committed
chore: quick update feat/render1 at 2025-12-30 21:19:29
1 parent a6ebaa6 commit 1dba8a8

5 files changed

Lines changed: 596 additions & 129 deletions

File tree

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Lint
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [ master, v2 ]
66
pull_request:
7-
branches: [master]
7+
branches: [ master, v2 ]
88

99
jobs:
1010
lint:
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-go@v5
1616
with:
17-
go-version: ">=1.22.0"
17+
go-version-file: 'go.mod'
1818

1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v8
File renamed without changes.

dix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"github.com/pubgo/dix/v2/dixrender"
1010
)
1111

12-
//go:embed .version
12+
//go:embed .version/VERSION
1313
var version string
1414

15-
func ReleaseVersion() string { return version }
15+
func Version() string { return version }
1616

1717
type (
1818
Option = dixinternal.Option

dixhttp/server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func NewServer(dix *dixinternal.Dix) *Server {
3030

3131
// setupRoutes configures all HTTP routes
3232
func (s *Server) setupRoutes() {
33-
s.mux.HandleFunc("/", s.handleIndex)
34-
s.mux.HandleFunc("/api/dependencies", s.handleDependencies)
33+
s.mux.HandleFunc("/", s.HandleIndex)
34+
s.mux.HandleFunc("/api/dependencies", s.HandleDependencies)
3535
}
3636

3737
// ServeHTTP implements http.Handler interface
@@ -44,15 +44,15 @@ func (s *Server) ListenAndServe(addr string) error {
4444
return http.ListenAndServe(addr, s)
4545
}
4646

47-
// handleIndex serves the HTML visualization page
48-
func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
47+
// HandleIndex serves the HTML visualization page
48+
func (s *Server) HandleIndex(w http.ResponseWriter, r *http.Request) {
4949
w.Header().Set("Content-Type", "text/html; charset=utf-8")
5050
w.WriteHeader(http.StatusOK)
5151
fmt.Fprint(w, htmlTemplate)
5252
}
5353

54-
// handleDependencies returns JSON data about providers and objects relationships
55-
func (s *Server) handleDependencies(w http.ResponseWriter, r *http.Request) {
54+
// HandleDependencies returns JSON data about providers and objects relationships
55+
func (s *Server) HandleDependencies(w http.ResponseWriter, r *http.Request) {
5656
data := s.extractDependencyData()
5757

5858
w.Header().Set("Content-Type", "application/json; charset=utf-8")

0 commit comments

Comments
 (0)