generated from crossplane/function-template-go
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move code from main into sub packages
Move internal logic into `internal/fn` and expose constructor in `pkg/fn` that can be importet in other modules. Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>
- Loading branch information
Showing
10 changed files
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package fn | ||
|
||
import ( | ||
"io/fs" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Package fn defines the public interface for patch-and-transform functions. | ||
package fn | ||
|
||
import ( | ||
fninternal "github.com/crossplane-contrib/function-go-templating/internal/fn" | ||
) | ||
|
||
var ( | ||
// NewFunction creates a new Function with the given options. | ||
NewFunction = fninternal.NewFunction | ||
|
||
// WithLogger adds a logger to a Function. | ||
WithLogger = fninternal.WithLogger | ||
|
||
// WithFilesystem adds a filesystem to a Function. | ||
WithFileSystem = fninternal.WithFileSystem | ||
) |