Title: Dynamically place go version in README · Issue #21 · evstack/.github · GitHub
Open Graph Title: Dynamically place go version in README · Issue #21 · evstack/.github
X Title: Dynamically place go version in README · Issue #21 · evstack/.github
Description: From chatgpt Yes, you can dynamically pull the Go version from a go.mod file and display it in your README.md file by using a simple script that reads the version from go.mod and updates README.md. Here’s a basic example using a shell sc...
Open Graph Description: From chatgpt Yes, you can dynamically pull the Go version from a go.mod file and display it in your README.md file by using a simple script that reads the version from go.mod and updates README.md....
X Description: From chatgpt Yes, you can dynamically pull the Go version from a go.mod file and display it in your README.md file by using a simple script that reads the version from go.mod and updates README.md....
Opengraph URL: https://github.com/evstack/.github/issues/21
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dynamically place go version in README","articleBody":"From chatgpt\r\n\r\nYes, you can dynamically pull the Go version from a `go.mod` file and display it in your `README.md` file by using a simple script that reads the version from `go.mod` and updates `README.md`. Here’s a basic example using a shell script to automate this.\r\n\r\n### 1. Create a Shell Script\r\n\r\nCreate a script, for example, called `update-readme.sh`:\r\n\r\n```bash\r\n#!/bin/bash\r\n\r\n# Extract the Go version from go.mod\r\nGO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')\r\n\r\n# Update README.md by replacing the placeholder or existing Go version\r\nsed -i \"\" -e \"s/Go Version: .*/Go Version: $GO_VERSION/\" README.md\r\n```\r\n\r\nThis script:\r\n- Reads the Go version from `go.mod`.\r\n- Updates `README.md` by finding a line containing \"Go Version:\" and replacing it with the current Go version.\r\n\r\n### 2. Use a Placeholder in README.md\r\n\r\nIn your `README.md`, set up a placeholder like this:\r\n\r\n```markdown\r\n# Project Title\r\n\r\nThis project uses:\r\n\r\n- **Go Version:** [dynamically set here]\r\n```\r\n\r\nRun the script to replace `[dynamically set here]` with the actual version.\r\n\r\n### 3. Automate the Update\r\n\r\nTo keep this up-to-date, you can add the script as a part of your build or CI pipeline, or run it manually whenever you update `go.mod`.\r\n\r\nLet me know if you’d like to automate this further!","author":{"url":"https://github.com/MSevey","@type":"Person","name":"MSevey"},"datePublished":"2024-11-14T19:22:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/21/.github/issues/21"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:067b798f-de90-1a18-41c4-88fde04a6952 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88EA:95F8B:867133:BB56A3:6981E3D2 |
| html-safe-nonce | 207f5d3999435feb228158bd2759a0e8048e6765ae199344cdf57410a2535bbc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEVBOjk1RjhCOjg2NzEzMzpCQjU2QTM6Njk4MUUzRDIiLCJ2aXNpdG9yX2lkIjoiNjIwMjM5NTQwNTMwMTQ0MTQ5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aafa04b6a3014174bf11b6e09899a1a52b93383a74fb0fd91e44b18bdc6dc32a |
| hovercard-subject-tag | issue:2659815409 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/evstack/.github/21/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55159a54af89621923f693ac8f9fc3455587fef4bbfec892bad777a99e86ad98/evstack/.github/issues/21 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55159a54af89621923f693ac8f9fc3455587fef4bbfec892bad777a99e86ad98/evstack/.github/issues/21 |
| og:image:alt | From chatgpt Yes, you can dynamically pull the Go version from a go.mod file and display it in your README.md file by using a simple script that reads the version from go.mod and updates README.md.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MSevey |
| hostname | github.com |
| expected-hostname | github.com |
| None | ebfdf8d3e0fd17b103f41cc6696d84938694ebebdfecaf11fe00dbe4a9785801 |
| turbo-cache-control | no-preview |
| go-import | github.com/evstack/.github git https://github.com/evstack/.github.git |
| octolytics-dimension-user_id | 120482652 |
| octolytics-dimension-user_login | evstack |
| octolytics-dimension-repository_id | 595179001 |
| octolytics-dimension-repository_nwo | evstack/.github |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 595179001 |
| octolytics-dimension-repository_network_root_nwo | evstack/.github |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 471ae8701b77c1bf177c58019d2e6fd65ae89141 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width