feat: add tags feature

This commit is contained in:
Technofab 2022-12-04 20:25:41 +01:00
parent f394814c2e
commit 538ff9c6f6
No known key found for this signature in database
GPG key ID: A0AA746B951C8830
6 changed files with 28 additions and 20 deletions

View file

@ -26,7 +26,7 @@ import (
// CompilerManager is to manage compiler
type CompilerManager interface {
// GetCompiler is used to get compiler of specified proto file path
GetCompiler(ctx context.Context, protoFilePath string) (Compiler, error)
GetCompiler(ctx context.Context, protoFilePath string, tags []string) (Compiler, error)
}
// BasicCompilerManager is the basic implement of CompilerManager
@ -66,8 +66,8 @@ func NewBasicCompilerManager(ctx context.Context,
}
// GetCompiler is used to get compiler of specified proto file path
func (b *BasicCompilerManager) GetCompiler(ctx context.Context, protoFilePath string) (Compiler, error) {
config, err := b.configManager.GetConfig(ctx, protoFilePath)
func (b *BasicCompilerManager) GetCompiler(ctx context.Context, protoFilePath string, tags []string) (Compiler, error) {
config, err := b.configManager.GetConfig(ctx, protoFilePath, tags)
if err != nil {
return nil, err
}