Skip to content

파일 생성시 copyright 자동 생성 설정법

KimJunHui edited this page Aug 1, 2018 · 3 revisions

저희 it-chain의 모든 file에는 copyright 주석을 포함해야 합니다.

File을 만들 때마다 copyright 주석을 복사해서 붙여넣기는 꽤나 귀찮은 방법이기에 자동으로 설정하는 법을 소개합니다!

MacOS GoLand 기준 설명입니다.

Setting

preferences

  1. GoLand 왼쪽 상단 위 메뉴에서 GoLand - Preferences로 이동합니다.

template

  1. 왼쪽 네비게이션 바에서 Editor - File and Code Templates 메뉴로 이동합니다.
  2. Files탭의 Go File을 클릭합니다.
  3. 기본 설정으로 package ${GO_PACKAGE_NAME}이 적혀있습니다. 이 앞에 copyright 주석을 추가하고 OK버튼을 클릭합니다.

Copyright

/*
 * Copyright 2018 It-chain
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Clone this wiki locally