Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- genFeatureSetFromGroup :: Text -> Text -> Service.ContextField -> Haxl ()
- genFeatureSetFromGroup teamName groupName cf =
- do
- templatePath <- H.io $ getPathInSigma
- "FeatureSets/FeatureStore/FeatureSetFromGroupTemplate.txt"
- template <- H.io $ TextIO.readFile templatePath
- -- Write to FeatureSet file
- featureSetFilePath <- H.io $ getPathInSigma $
- "FeatureSets/Generated" </> Text.unpack fileName
- H.io $ TextIO.writeFile featureSetFilePath $ fillContents template
- H.io $ print $ "Created FeatureSet: " <> fileName
- where
- fillContents contents =
- contents
- & Text.replace "<MODULE_NAME>" moduleName
- & Text.replace "<FEATURE_SET_NAME>" featureSetName
- & Text.replace "<FEATURES>" (featureSetContent teamName groupName)
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement