Skip to content

Commit 86ff9f8

Browse files
author
zoidbergwill
committed
Remove some unused stuff
Supporting the BUILDEVENT_FILE + BUILDEVENT_CIPROVIDER would maybe be useful, but we can always bring them back if there is a usecase
1 parent 9e186a9 commit 86ff9f8

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

main.go

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func handleRequest(defaultConfig *libhoney.Config, w http.ResponseWriter, req *h
239239
}
240240
}
241241

242-
func commandRoot(cfg *libhoney.Config, filename *string, ciProvider *string) *cobra.Command {
242+
func commandRoot(cfg *libhoney.Config) *cobra.Command {
243243
root := &cobra.Command{
244244
Version: Version,
245245
Use: "buildevents",
@@ -265,32 +265,14 @@ about your Continuous Integration builds.`,
265265
root.PersistentFlags().Lookup("apihost").Value.Set(apihost)
266266
}
267267

268-
root.PersistentFlags().StringVarP(filename, "filename", "f", "", "[env.BUILDEVENT_FILE] the path of a text file holding arbitrary key=val pairs (multi-line-capable, logfmt style) to be added to the Honeycomb event")
269-
if fname, ok := os.LookupEnv("BUILDEVENT_FILE"); ok {
270-
root.PersistentFlags().Lookup("filename").Value.Set(fname)
271-
}
272-
273-
root.PersistentFlags().StringVarP(ciProvider, "provider", "p", "GitLab-CI", "[env.BUILDEVENT_CIPROVIDER] if unset, will inspect the environment to try to detect common CI providers.")
274-
275268
return root
276269
}
277270

278271
func main() {
279272
defer libhoney.Close()
280273
var config libhoney.Config
281-
var filename string
282-
var ciProvider string
283-
// var wcfg watchConfig
284-
285-
root := commandRoot(&config, &filename, &ciProvider)
286-
287-
// Put 'em all together
288-
root.AddCommand(
289-
// commandBuild(&config, &filename, &ciProvider),
290-
// commandStep(&config, &filename, &ciProvider),
291-
// commandCmd(&config, &filename, &ciProvider),
292-
// commandWatch(&config, &filename, &ciProvider, &wcfg),
293-
)
274+
275+
root := commandRoot(&config)
294276

295277
// Do the work
296278
if err := root.Execute(); err != nil {

0 commit comments

Comments
 (0)