From 587436536014b02df98ae627e8ded02b9e0bc747 Mon Sep 17 00:00:00 2001 From: Andreas Creten Date: Fri, 28 Apr 2023 14:28:06 +0200 Subject: [PATCH] Linting --- internal/provider/daemon_data_source.go | 12 ++++----- internal/provider/server_data_source.go | 28 +++++++++---------- internal/provider/site_data_source.go | 36 ++++++++++++------------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/internal/provider/daemon_data_source.go b/internal/provider/daemon_data_source.go index ae37423..0434a44 100644 --- a/internal/provider/daemon_data_source.go +++ b/internal/provider/daemon_data_source.go @@ -132,15 +132,15 @@ func (d *DaemonDataSource) Read(ctx context.Context, req datasource.ReadRequest, return } - data.Command = types.StringValue(string(daemon.Command)) - data.User = types.StringValue(string(daemon.User)) - data.Directory = types.StringValue(string(daemon.Directory)) + data.Command = types.StringValue(daemon.Command) + data.User = types.StringValue(daemon.User) + data.Directory = types.StringValue(daemon.Directory) data.Processes = types.Int64Value(int64(daemon.Processes)) data.Startsecs = types.Int64Value(int64(daemon.Startsecs)) data.Stopwaitsecs = types.Int64Value(int64(daemon.Stopwaitsecs)) - data.Stopsignal = types.StringValue(string(daemon.Stopsignal)) - data.Status = types.StringValue(string(daemon.Status)) - data.CreatedAt = types.StringValue(string(daemon.CreatedAt)) + data.Stopsignal = types.StringValue(daemon.Stopsignal) + data.Status = types.StringValue(daemon.Status) + data.CreatedAt = types.StringValue(daemon.CreatedAt) // Write logs using the tflog package // Documentation: https://terraform.io/plugin/log diff --git a/internal/provider/server_data_source.go b/internal/provider/server_data_source.go index db70f99..8340de7 100644 --- a/internal/provider/server_data_source.go +++ b/internal/provider/server_data_source.go @@ -170,20 +170,20 @@ func (d *ServerDataSource) Read(ctx context.Context, req datasource.ReadRequest, } data.CredentialId = types.Int64Value(int64(server.CredentialId)) - data.Name = types.StringValue(string(server.Name)) - data.Size = types.StringValue(string(server.Size)) - data.Region = types.StringValue(string(server.Region)) - data.PhpVersion = types.StringValue(string(server.PhpVersion)) - data.PhpCliVersion = types.StringValue(string(server.PhpCliVersion)) - data.OpcacheStatus = types.StringValue(string(server.OpcacheStatus)) - data.DatabaseType = types.StringValue(string(server.DatabaseType)) - data.IpAddress = types.StringValue(string(server.IpAddress)) - data.PrivateIpAddress = types.StringValue(string(server.PrivateIpAddress)) - data.BlackfireStatus = types.StringValue(string(server.BlackfireStatus)) - data.PapertrailStatus = types.StringValue(string(server.PapertrailStatus)) - data.Revoked = types.StringValue(string(server.Revoked)) - data.CreatedAt = types.StringValue(string(server.CreatedAt)) - data.IsReady = types.StringValue(string(server.IsReady)) + data.Name = types.StringValue(server.Name) + data.Size = types.StringValue(server.Size) + data.Region = types.StringValue(server.Region) + data.PhpVersion = types.StringValue(server.PhpVersion) + data.PhpCliVersion = types.StringValue(server.PhpCliVersion) + data.OpcacheStatus = types.StringValue(server.OpcacheStatus) + data.DatabaseType = types.StringValue(server.DatabaseType) + data.IpAddress = types.StringValue(server.IpAddress) + data.PrivateIpAddress = types.StringValue(server.PrivateIpAddress) + data.BlackfireStatus = types.StringValue(server.BlackfireStatus) + data.PapertrailStatus = types.StringValue(server.PapertrailStatus) + data.Revoked = types.StringValue(server.Revoked) + data.CreatedAt = types.StringValue(server.CreatedAt) + data.IsReady = types.StringValue(server.IsReady) //data.Network = types.ListValue(types.Int64Type, server.Network) //data.Tags = types.ListValue(types.StringType, server.Tags) diff --git a/internal/provider/site_data_source.go b/internal/provider/site_data_source.go index 2c3fec2..65a43cc 100644 --- a/internal/provider/site_data_source.go +++ b/internal/provider/site_data_source.go @@ -189,25 +189,25 @@ func (d *SiteDataSource) Read(ctx context.Context, req datasource.ReadRequest, r return } - data.Name = types.StringValue(string(site.Name)) + data.Name = types.StringValue(site.Name) //data.Aliases = types.ListValue(types.StringType, site.Aliases) - data.Username = types.StringValue(string(site.Username)) - data.Directory = types.StringValue(string(site.Directory)) - data.Wildcards = types.StringValue(string(site.Wildcards)) - data.Status = types.StringValue(string(site.Status)) - data.Repository = types.StringValue(string(site.Repository)) - data.RepositoryProvider = types.StringValue(string(site.RepositoryProvider)) - data.RepositoryBranch = types.StringValue(string(site.RepositoryBranch)) - data.RepositoryStatus = types.StringValue(string(site.RepositoryStatus)) - data.QuickDeploy = types.StringValue(string(site.QuickDeploy)) - data.ProjectType = types.StringValue(string(site.ProjectType)) - data.App = types.StringValue(string(site.App)) - data.AppStatus = types.StringValue(string(site.AppStatus)) - data.SlackChannel = types.StringValue(string(site.SlackChannel)) - data.TelegramChatId = types.StringValue(string(site.TelegramChatId)) - data.TelegramChatTitle = types.StringValue(string(site.TelegramChatTitle)) - data.DeploymentUrl = types.StringValue(string(site.DeploymentUrl)) - data.CreatedAt = types.StringValue(string(site.CreatedAt)) + data.Username = types.StringValue(site.Username) + data.Directory = types.StringValue(site.Directory) + data.Wildcards = types.StringValue(site.Wildcards) + data.Status = types.StringValue(site.Status) + data.Repository = types.StringValue(site.Repository) + data.RepositoryProvider = types.StringValue(site.RepositoryProvider) + data.RepositoryBranch = types.StringValue(site.RepositoryBranch) + data.RepositoryStatus = types.StringValue(site.RepositoryStatus) + data.QuickDeploy = types.StringValue(site.QuickDeploy) + data.ProjectType = types.StringValue(site.ProjectType) + data.App = types.StringValue(site.App) + data.AppStatus = types.StringValue(site.AppStatus) + data.SlackChannel = types.StringValue(site.SlackChannel) + data.TelegramChatId = types.StringValue(site.TelegramChatId) + data.TelegramChatTitle = types.StringValue(site.TelegramChatTitle) + data.DeploymentUrl = types.StringValue(site.DeploymentUrl) + data.CreatedAt = types.StringValue(site.CreatedAt) //data.Tags = types.ListValue(types.Int64Type, site.Tags) // Write logs using the tflog package