Error messages could get quite lengthy as the code was written previously, because we always used the complete absolute path for the file in question. This change "prettifies" this to be relative to whatever contextual path the user has chosen during compilation. This shortens messages considerably.
19 lines
406 B
Go
19 lines
406 B
Go
// Copyright 2016 Marapongo, Inc. All rights reserved.
|
|
|
|
package compiler
|
|
|
|
import (
|
|
"github.com/marapongo/mu/pkg/diag"
|
|
)
|
|
|
|
// Options contains all of the settings a user can use to control the compiler's behavior.
|
|
type Options struct {
|
|
Diag diag.Sink
|
|
}
|
|
|
|
// DefaultOpts returns the default set of compiler options.
|
|
func DefaultOpts(pwd string) Options {
|
|
return Options{
|
|
Diag: diag.DefaultSink(pwd),
|
|
}
|
|
}
|