From f4d161372a057389abc5b5cb33a599d5658c5faa Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Wed, 11 Mar 2015 13:10:45 -0700 Subject: [PATCH] service: add ChosenService function. --- service.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/service.go b/service.go index 0ee223d..9fa87f6 100644 --- a/service.go +++ b/service.go @@ -155,8 +155,6 @@ func (kv KeyValue) float64(name string, defaultValue float64) float64 { return defaultValue } -// TODO: Do these really need to be package level? - // Platform returns a description of the system service. func Platform() string { if system == nil { @@ -184,8 +182,6 @@ func newSystem() System { return nil } -// TODO: Choose system could return the choosen system. - // ChooseSystem chooses a system from the given system services. // SystemServices are considered in the order they are suggested. // Calling this may change what Interactive and Platform return. @@ -194,6 +190,11 @@ func ChooseSystem(a ...System) { system = newSystem() } +// ChosenSystem returns the system that service will use. +func ChosenSystem() System { + return system +} + // AvailableSystems returns the list of system services considered // when choosing the system service. func AvailableSystems() []System {