This commit is contained in:
Byung Jun Park 2019-01-07 22:22:16 +09:00
parent eb0e89420a
commit 88b1c4c2e0
2 changed files with 7 additions and 23 deletions

14
Gopkg.lock generated
View File

@ -3,27 +3,27 @@
[[projects]] [[projects]]
branch = "master" branch = "master"
digest = "1:1eb29fc11efa5053d8cff0e616b5fc410e0701249e6c32d4581a24e2210e39ad" digest = "1:38b147752ea16bbd2e6f76d2d3ee7ba5cc632c32fed6a30230f3dc028dcb70d2"
name = "git.loafle.net/overflow/annotation-go" name = "git.loafle.net/overflow/annotation-go"
packages = ["."] packages = ["."]
pruneopts = "UT" pruneopts = "UT"
revision = "b94873cf6c40c8a46393f4e9f229eee152e2eb1b" revision = "9fa1738c25a13334b9f58d7347ea1200183a3690"
[[projects]] [[projects]]
branch = "master" branch = "master"
digest = "1:d99533209fa8eb69e8d83cc908574c094b50128833097861c007cb74f8f8bb63" digest = "1:df55db6bbb4459f22ffb9a80474e50cbf0d46efecb3e7f1dd0c8460f7e6bbdbc"
name = "git.loafle.net/overflow/util-go" name = "git.loafle.net/overflow/util-go"
packages = ["reflect"] packages = ["reflect"]
pruneopts = "UT" pruneopts = "UT"
revision = "fae2846a85aad314ee44957d428478fbe800045f" revision = "c06889aa8cdca4800ead3d5459b145cf4da56d7e"
[[projects]] [[projects]]
digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96"
name = "gopkg.in/yaml.v2" name = "gopkg.in/yaml.v2"
packages = ["."] packages = ["."]
pruneopts = "UT" pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
version = "v2.2.1" version = "v2.2.2"
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"

View File

@ -1,17 +1 @@
package di package di
// `annotation:"@Inject(name? string)"`
// field 에 적용
// 1. 타입으로 매칭 없으면 에러 2. 여러개의 타입이 검색되면 그 중에 name으로 매칭
// `annotation:"@Resource(name? string)"`
// field 에 적용
// 1. 이름으로 매칭 2. 타입으로 매칭
// 이름이 지정되지 않으면 field 이름으로 먼저 찾고 없으면 타입으로 매칭
// @Component
// Component 등록 시에 파라미터로 제공
// names []string
// initMethod string
// destroyMethod string
// scope enum singleton, transiant