Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dc0ec0d

Browse files
committedNov 4, 2020
refactor: replace builtin package with fluxinit/static
A static initialization is not desirable in the main binaries, as it forces all paths of code to init, but it is still useful in tests. It allows static intialization to be performed once for all tests and eliminates the need to always add the FluxInit call. Added a fluxinit/static package that calls fluxinit.FluxInit() to replace the builtin package. This hides the nature of the initialization and makes it clear that it is mandatory initialization code.
1 parent 1089af1 commit dc0ec0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+65
-61
lines changed
 

‎builtin/builtin.go

-13
This file was deleted.

‎examples/library/library_example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package library_test
22

33
import (
4-
_ "github.com/influxdata/flux/builtin"
4+
_ "github.com/influxdata/flux/fluxinit/static"
55
)
66

77
// TODO (faith): https://github.com/influxdata/flux/issues/2476; this is not a test function,

0 commit comments

Comments
 (0)
Please sign in to comment.