기술/Go2 [Go] Beego를 이용한 서버 구축 조금만 찍먹해보기 Beego EC2에 서버를 올려서 테스트해볼 일이 잠깐 생겼다. 그래서 조금만 찍먹해본다. Homepage - beego: simple & powerful Go app framework MODULAR With powerful built-in modules including session control, caching, logging, configuration parsing, performance supervising, context handling, ORM supporting, and requests simulating. You get the powerful foundation for any type of applications. beego.vip 그 전에 간략한 설명 1. beego가 뭔가? - Go에.. 2022. 5. 30. [golint] exported method CrawlURLS returns unexported type []services.importerURL, which can be annoying to use golint 약간 고민을 했던 주제였다. Jenkins에 golint를 이용한 체크 로직이 들어있기 때문에 이 규칙에 준수를 해줘야 하는데, 통과시키려고 코드를 정리하던 중 제목과 같은 에러메세지가 발생했다. 에러를 요약하자면 사용하기엔 짜증나는 타입을 만들어놨다는 것이었다. 어떤 코드가 그렇게 짜증이 났을까? type foo struct{} func Bar() foo { return foo{} } 다음과 같이 코드를 사용하면 외부에서는 이런 식으로 값을 받아오게 된다. func anyFunc() { result := Bar() } private struct type인 foo 형식을 외부에서 받아오게 되는 모양새를 취하게 되는데, 만약 이 값을 험하게 다뤄, 반환에 반환을 하고 다시 전달전달... 이런 .. 2022. 4. 12. 이전 1 다음