Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Aug 27, 2024
1 parent 08f87e2 commit a9b10ac
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 213 deletions.
8 changes: 6 additions & 2 deletions core/src/main/golang/native/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ func forEachProviders(rawCfg *config.RawConfig, fun func(index int, total int, k

func destroyProviders(cfg *config.Config) {
for _, p := range cfg.Providers {
_ = p.(io.Closer).Close()
if p, ok := p.(io.Closer); ok {
_ = p.Close()
}
}

for _, p := range cfg.RuleProviders {
_ = p.(io.Closer).Close()
if p, ok := p.(io.Closer); ok {
_ = p.Close()
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build !premium

package main

//#include "bridge.h"
Expand Down
75 changes: 0 additions & 75 deletions core/src/main/golang/native/log_premium.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build !premium

package tun

import (
Expand Down
29 changes: 0 additions & 29 deletions core/src/main/golang/native/tun/metadata_premium.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build !premium

package tunnel

import (
Expand Down
7 changes: 0 additions & 7 deletions core/src/main/golang/native/tunnel/loopback_premium.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build !premium

package tunnel

import (
Expand Down
92 changes: 0 additions & 92 deletions core/src/main/golang/native/tunnel/providers_premium.go

This file was deleted.

0 comments on commit a9b10ac

Please sign in to comment.