Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

set "app_root" from environment variables

Open
#23 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
tooling

Research direction

Start at the Load function in refresh/config.go and inspect how YAML populates Configuration.AppRoot. Verify environment expansion for the app_root value, including the documented $GOPATH and $APP_PATH form; done means loading a configuration resolves those variables correctly.

Written by the indexing model from the issue text.

Description

Hey,

I think it would be nice to be able to set the app_root from environment variables like this:

app_root: "$GOPATH/src/$APP_PATH"

It should be pretty easy to implement this, there just would need to be a call to os.ExpandEnv(c.AppRoot) at the end of the Load function. E.g.:

func (c *Configuration) Load(path string) error {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(data, c)
	if err != nil {
		return err
	}

	c.AppRoot = os.ExpandEnv(c.AppRoot)

	return err
}
Dominant language
Go
Stars
196
Forks
32
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from markbates/refresh

All issues in markbates/refresh

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.