Skip to content

Generated go file should have a package statement #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
douglarek opened this issue Feb 18, 2019 · 2 comments
Open

Generated go file should have a package statement #134

douglarek opened this issue Feb 18, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@douglarek
Copy link

douglarek commented Feb 18, 2019

for example, 217.contains-duplicate.go:

/*
 * @lc app=leetcode.cn id=217 lang=golang
 *
 * [217] 存在重复元素
 *
 * https://leetcode-cn.com/problems/contains-duplicate/description/
 *
 * algorithms
 * Easy (45.70%)
 * Total Accepted:    39.3K
 * Total Submissions: 85.9K
 * Testcase Example:  '[1,2,3,1]'
 *
 * 给定一个整数数组,判断是否存在重复元素。
 * 
 * 如果任何值在数组中出现至少两次,函数返回 true。如果数组中每个元素都不相同,则返回 false。
 * 
 * 示例 1:
 * 
 * 输入: [1,2,3,1]
 * 输出: true
 * 
 * 示例 2:
 * 
 * 输入: [1,2,3,4]
 * 输出: false
 * 
 * 示例 3:
 * 
 * 输入: [1,1,1,3,3,4,3,2,4,2]
 * 输出: true
 * 
 */
func containsDuplicate(nums []int) bool {
    
}

it will not compile since it has no package statement in the file header.

@greyireland
Copy link

+1

1、vscode 提示:[go] expected 'package', found 'func'

2、没有代码提示

@poppinlp
Copy link
Contributor

@douglarek Hi. I think this issue relates to skygragon/leetcode-cli#111.

@jdneo jdneo added the help wanted Extra attention is needed label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants