Skip to content

Commit 5b60613

Browse files
committed
refactor(go): remove Compiler.IgnoreModule from the public API.
The same thing can be achieved by using the `IgnoreModule` option when creating the compiler. For simplicity and consistency let's have a single way to do this.
1 parent 003e0cb commit 5b60613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

go/compiler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func NewCompiler(opts... CompileOption) (*Compiler, error) {
205205

206206
func (c *Compiler) initialize() error {
207207
for name, _ := range c.ignoredModules {
208-
c.IgnoreModule(name)
208+
c.ignoreModule(name)
209209
}
210210
for ident, value := range c.vars {
211211
if err := c.DefineGlobal(ident, value); err != nil {
@@ -273,12 +273,12 @@ func (c *Compiler) AddSource(src string, opts... SourceOption) error {
273273
return nil
274274
}
275275

276-
// IgnoreModule tells the compiler to ignore the module with the given name.
276+
// ignoreModule tells the compiler to ignore the module with the given name.
277277
//
278278
// Any YARA rule using the module will be ignored, as well as rules that depends
279279
// on some other rule that uses the module. The compiler will issue warnings
280280
// about the ignored rules, but otherwise the compilation will succeed.
281-
func (c *Compiler) IgnoreModule(module string) {
281+
func (c *Compiler) ignoreModule(module string) {
282282
cModule := C.CString(module)
283283
defer C.free(unsafe.Pointer(cModule))
284284
result := C.yrx_compiler_ignore_module(c.cCompiler, cModule)

0 commit comments

Comments
 (0)