goose: remove optional directive

This introduces some short-term pain in practice, but I aim to fix that
with the goose.Value directive.

Reviewed-by: Tuo Shan <shantuo@google.com>
This commit is contained in:
Ross Light
2018-04-26 14:23:06 -04:00
parent cfc6111ea5
commit 3345599aaf
20 changed files with 11 additions and 197 deletions

View File

@@ -85,9 +85,6 @@ func solve(mc *providerSetCache, out types.Type, given []types.Type, sets []symr
p, _ := providers.At(typ).(*Provider)
if p == nil {
if trail[len(trail)-1].Optional {
return nil
}
if len(trail) == 1 {
return fmt.Errorf("no provider found for %s (output of injector)", types.TypeString(typ, nil))
}