[PR #75] [MERGED] Add helper for appending location blocks to server #73

Closed
opened 2026-02-28 01:20:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/75
Author: @tufanbarisyildirim
Created: 2/20/2026
Status: Merged
Merged: 2/20/2026
Merged by: @tufanbarisyildirim

Base: masterHead: fix/issue-41-add-location-helper


📝 Commits (1)

  • 12c8d71 Add Server.AddLocation helper

📊 Changes

3 files changed (+167 additions, -0 deletions)

View changed files

📝 GUIDE.md (+45 -0)
📝 config/server.go (+26 -0)
config/server_test.go (+96 -0)

📄 Description

Summary

  • add (*config.Server).AddLocation(*config.Location) helper for programmatically appending location blocks
  • ensure parent pointers are wired when adding a location
  • add tests for append behavior and server-block initialization
  • document usage in GUIDE.md

Testing

  • go test ./config ./dumper ./parser
  • make test

Closes #41


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tufanbarisyildirim/gonginx/pull/75 **Author:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Base:** `master` ← **Head:** `fix/issue-41-add-location-helper` --- ### 📝 Commits (1) - [`12c8d71`](https://github.com/tufanbarisyildirim/gonginx/commit/12c8d71d14e327eced1388759a450b4bdf5a0091) Add Server.AddLocation helper ### 📊 Changes **3 files changed** (+167 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `GUIDE.md` (+45 -0) 📝 `config/server.go` (+26 -0) ➕ `config/server_test.go` (+96 -0) </details> ### 📄 Description ## Summary - add `(*config.Server).AddLocation(*config.Location)` helper for programmatically appending location blocks - ensure parent pointers are wired when adding a location - add tests for append behavior and server-block initialization - document usage in `GUIDE.md` ## Testing - `go test ./config ./dumper ./parser` - `make test` Closes #41 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:20:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#73
No description provided.