Commit e203abdc authored by Ilya Galimyanov's avatar Ilya Galimyanov Committed by Sander van Harmelen

Update README to the current code (#381)

parent 60ef0cdb
......@@ -130,7 +130,7 @@ func main() {
Description: gitlab.String("Just a test project to play with"),
MergeRequestsEnabled: gitlab.Bool(true),
SnippetsEnabled: gitlab.Bool(true),
Visibility: gitlab.VisibilityLevel(gitlab.PublicVisibility),
Visibility: gitlab.Visibility(gitlab.PublicVisibility),
}
project, _, err := git.Projects.CreateProject(p)
if err != nil {
......@@ -138,11 +138,11 @@ func main() {
}
// Add a new snippet
s := &gitlab.CreateSnippetOptions{
s := &gitlab.CreateProjectSnippetOptions{
Title: gitlab.String("Dummy Snippet"),
FileName: gitlab.String("snippet.go"),
Code: gitlab.String("package main...."),
Visibility: gitlab.VisibilityLevel(gitlab.PublicVisibility),
Visibility: gitlab.Visibility(gitlab.PublicVisibility),
}
_, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment