Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove once in ftl.Map to allow changing underlying values (#1435)
fixes #1390 `ftl.Map` was just using `once` as an optimisation. But this unit test case was not being handled properly: ``` ctx := ftltest.Context( ftltest.WithConfig(example, "hello"), ) //Call a verb that uses ftl.Map with example config resp, err := Verb(ctx, req) ctx = ftltest.Context( ftltest.WithConfig(example, "world"), ) //When this execution of the verb is done, it should execute again because the underlying value is different (hello -> world) resp, err = Verb(ctx, req) ``` To solve this, now the mapping func is called each time. For use cases where modules want to map a `*sql.DB` to a `DAL`, it will create a new DAL instance each time
- Loading branch information