Skip to content

Commit 42b2b56

Browse files
authored
chore: initialize project name from template (#7)
* chore: initialize project name from template Replace {{PROJECT_NAME}} placeholders with llm-d-inference-payload-processor across go.mod, Dockerfile, Makefile, README.md, and the feature request issue template. Drop the template TODO banners now that the values are set. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * fix: point build at ./cmd and make go.sum optional The Go entrypoint lives in ./cmd/main.go, so 'make build' and the Dockerfile build step need to target ./cmd rather than the repo root. Also make go.sum optional in the Dockerfile using the COPY go.su[m] glob trick — the file doesn't exist until the first dependency is added, and the template shouldn't require a placeholder go.sum. Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1 parent a9130d4 commit 42b2b56

5 files changed

Lines changed: 14 additions & 17 deletions

File tree

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body:
1111
Thank you for suggesting an improvement! Please fill in the details below.
1212
1313
Before opening a new feature request, please check
14-
[existing issues](https://github.com/llm-d/{{PROJECT_NAME}}/issues)
14+
[existing issues](https://github.com/llm-d/llm-d-inference-payload-processor/issues)
1515
to see if a similar request already exists.
1616
1717
- type: textarea

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
# Multi-stage build for {{PROJECT_NAME}}
1+
# Multi-stage build for llm-d-inference-payload-processor
22
# Supports multi-arch: linux/amd64, linux/arm64
33

44
# --- Build stage ---
55
FROM golang:1.24 AS builder
66

77
WORKDIR /workspace
88

9-
# Cache dependencies
10-
COPY go.mod go.sum ./
9+
# Cache dependencies (go.sum is optional until the first dep is added)
10+
COPY go.mod ./
11+
COPY go.su[m] ./
1112
RUN go mod download
1213

1314
# Copy source and build
1415
COPY . .
15-
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /workspace/app .
16+
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /workspace/app ./cmd
1617

1718
# --- Runtime stage ---
1819
FROM gcr.io/distroless/static:nonroot

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Project configuration
2-
# TODO: Replace {{PROJECT_NAME}} with your project name
3-
PROJECT_NAME ?= {{PROJECT_NAME}}
2+
PROJECT_NAME ?= llm-d-inference-payload-processor
43
REGISTRY ?= ghcr.io/llm-d
54
IMAGE ?= $(REGISTRY)/$(PROJECT_NAME)
65
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
@@ -25,7 +24,7 @@ help: ## Show this help message
2524

2625
.PHONY: build
2726
build: ## Build the Go binary
28-
go build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/$(PROJECT_NAME) .
27+
go build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o bin/$(PROJECT_NAME) ./cmd
2928

3029
.PHONY: test
3130
test: ## Run tests with race detection

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# {{PROJECT_NAME}}
1+
# llm-d-inference-payload-processor
22

3-
<!-- TODO: Replace {{PROJECT_NAME}} with your project name -->
4-
<!-- TODO: Update badges below with correct repo path -->
5-
6-
[![CI](https://github.com/llm-d/{{PROJECT_NAME}}/actions/workflows/ci-pr-checks.yaml/badge.svg)](https://github.com/llm-d/{{PROJECT_NAME}}/actions/workflows/ci-pr-checks.yaml)
3+
[![CI](https://github.com/llm-d/llm-d-inference-payload-processor/actions/workflows/ci-pr-checks.yaml/badge.svg)](https://github.com/llm-d/llm-d-inference-payload-processor/actions/workflows/ci-pr-checks.yaml)
74
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
85

9-
> **One-line description of what this project does.**
6+
> **Inference payload processor for llm-d.**
107
118
## Overview
129

@@ -22,8 +19,8 @@
2219

2320
```bash
2421
# Clone the repo
25-
git clone https://github.com/llm-d/{{PROJECT_NAME}}.git
26-
cd {{PROJECT_NAME}}
22+
git clone https://github.com/llm-d/llm-d-inference-payload-processor.git
23+
cd llm-d-inference-payload-processor
2724

2825
# Install pre-commit hooks
2926
pre-commit install

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/llm-d/{{PROJECT_NAME}}
1+
module github.com/llm-d/llm-d-inference-payload-processor
22

33
go 1.24.0

0 commit comments

Comments
 (0)