Skip to content
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

cannot use []ltm.Profile literal (type []ltm.Profile) as type []string in field value #1

Open
vincentmli opened this issue Dec 26, 2017 · 0 comments

Comments

@vincentmli
Copy link

when go building the sample script to create virtual from https://devcentral.f5.com/codeshare/go-library-to-manage-big-ip-icontrol-rest-api-925, got build error

cannot use []ltm.Profile literal (type []ltm.Profile) as type []string in field value

        // Create a Virtual Server
        log.Print("Create a Virtual Server")

        vsConfig := ltm.VirtualServer{
                Name:        "vs_http_" + tx.TransactionID(),
                Destination: "10.1.20.130:80",
                IPProtocol:  "tcp",
                Pool:        "pool_" + tx.TransactionID(),
                SourceAddressTranslation: ltm.SourceAddressTranslation{
                        Type: "automap",
                },
                Profiles: []ltm.Profile{
                        {
                                Name:    "tcp-mobile-optimized",
                                Context: "all",
                        },
                        {
                                Name: "http",
                        },
                },
        }

        if err := ltmClient.Virtual().Create(vsConfig); err != nil {
                log.Fatal(err)
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant