diff --git a/README.md b/README.md index 1652705af..305871517 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ to list all projects for user "svanharmelen": ```go git := gitlab.NewClient("yourtokengoeshere") -opt := &gitlab.ListProjectsOptions{Search: gitlab.String("svanharmelen")} +opt := &gitlab.ListProjectsOptions{Search: gitlab.Ptr("svanharmelen")} projects, _, err := git.Projects.ListProjects(opt) ``` @@ -159,11 +159,11 @@ func main() { // Create new project p := &gitlab.CreateProjectOptions{ - Name: gitlab.String("My Project"), - Description: gitlab.String("Just a test project to play with"), - MergeRequestsEnabled: gitlab.Bool(true), - SnippetsEnabled: gitlab.Bool(true), - Visibility: gitlab.Visibility(gitlab.PublicVisibility), + Name: gitlab.Ptr("My Project"), + Description: gitlab.Ptr("Just a test project to play with"), + MergeRequestsEnabled: gitlab.Ptr(true), + SnippetsEnabled: gitlab.Ptr(true), + Visibility: gitlab.Ptr(gitlab.PublicVisibility), } project, _, err := git.Projects.CreateProject(p) if err != nil { @@ -172,10 +172,10 @@ func main() { // Add a new snippet s := &gitlab.CreateProjectSnippetOptions{ - Title: gitlab.String("Dummy Snippet"), - FileName: gitlab.String("snippet.go"), - Content: gitlab.String("package main...."), - Visibility: gitlab.Visibility(gitlab.PublicVisibility), + Title: gitlab.Ptr("Dummy Snippet"), + FileName: gitlab.Ptr("snippet.go"), + Content: gitlab.Ptr("package main...."), + Visibility: gitlab.Ptr(gitlab.PublicVisibility), } _, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s) if err != nil {