New setting to apply the :z mount option to bind volumes on SELinux

New setting to apply the :z mount option to bind volumes on SELinux What's New in GoLand GoLand 2023.1 introduces the vulnerability checker, better navigation in gRPC code, and Rename refactoring

New setting to apply the :z mount option to bind volumes on SELinux

What's New in GoLand

GoLand 2023.1 introduces the vulnerability checker,

better navigation in gRPC code,

and Rename refactoring for generic receivers.

You can now run scratch files with non-standard-library packages,

use regular expressions to create your own search and replace inspections,

as well as quickly convert raw string literals to double-quoted ones and vice-versa.

The Implement interface intention action now works for unexported interfaces.

Apart from that, you will find several improvements for our new UI,

updates for Docker and Kubernetes, and improvements for web development.

If you prefer an interactive approach to learning,

we invite you to complete the

What's New in GoLand 2023.1 tutorial

from the Welcome screen.

Vulnerability checker

GoLand highlights a package with known vulnerabilities in go.mod   Highlight vulnerable packages   GoLand can now highlight packages with known vulnerabilities in . Hover over the highlighted code or press Alt+Enter, choose Show vulnerability info for …, and GoLand will show you a list of vulnerabilities with links to the detailed description. The data about vulnerabilities is provided by the software security company Checkmarx. Using a quick-fix to update a vulnerable dependency to a safe version   Update vulnerable packages to the secure version   You can place the cursor on a highlighted package in , press Alt+Enter, and choose the Change package-name version to v0.x.x quick-fix to update a dependency to a version that doesn't have vulnerabilities. GoLand highlights method calls from a package with known vulnerabilities   Highlight method calls from vulnerable packages   GoLand also highlights method calls from packages with known vulnerabilities right in your editor. You can hover over highlighted code and see a popup with information about the vulnerability and a link to the detailed description. The new Dependency Checker tool window   Dependency Checker tool window   You can access it via Code | Analyze Code | Show Vulnerable Dependencies.   gRPC navigation   Using gutter icons to navigate between .proto file services and their implementations in Go code   GoLand’s HTTP Client currently supports running gRPC requests. You can also run gRPC requests from the Endpoints tool window.   This version offers another valuable addition to our gRPC feature set. You can now navigate and access declarations of messages, services, and methods from Go code and their Go implementations from files.   For this, click the dedicated icon next to the declaration of a message, service, method, or their implementation.   Scratch files   Running code with non-standard-library dependencies in a scratch file   Run scratch files with non-standard-library packages   You can now run scratch files with non-standard-library Go dependencies. When you copy your code from a project file to a scratch file and press the Run button, GoLand creates a Run configuration with the flag. This flag is used with a JSON file that maps file paths to and in your original project.   Generics   Using the Rename refactoring to change generic receivers   Rename refactoring for generic receivers   When you rename a type parameter in a struct, the Rename refactoring now suggests changing the receivers accordingly.   We've fixed several issues affecting navigation between interfaces, implementations, and method specifications in generic code. We've also implemented several additional fixes for generics-related false positives and false negatives.   Intentions and quick-fixes   Using an intention action to convert string literals   Conversion between different kinds of string literals   Now, there is an intention action that lets you quickly convert raw string literals – strings that are surrounded by backticks – to double-quoted ones and vice-versa. Using a new quick-fix to convert an integer to a string   Simplified conversion of integers to strings   Previously, when you needed to convert an integer to a string, GoLand would first suggest the Convert to ‘string’ quick-fix. To complete the conversion correctly, you would then need another quick-fix – Convert integer to string using strconv.Itoa() call.   We’ve simplified this workflow, and now GoLand suggests the Convert integer to string using strconv.Itoa() call quick-fix right away. Using the Implement interface intention action with unexported interfaces   Ability to implement unexported interfaces   The Implement interface intention action now works for unexported interfaces. Using a quick-fix to remove a leading space from a go directive   Remove leading spaces from Go directives   GoLand now has an inspection and a quick-fix that will help you to detect and remove leading spaces in Go directives like . Using the preview functionality for intention actions   Intention Preview: More supported intentions and quick-fixes   In the previous release, we enabled the Intention Preview functionality by default.   This feature lets you instantly see how your code will be altered once you apply the IDE’s suggestions.   It is now possible to preview a broader range of intention actions and quick-fixes: Introduce local variable, Create variable/global variable, Create constant/global constant, Create field, Merge declaration up, Delete all unused parameters, Create function, Create method, Fill all fields.   Performance improvements   Scanning files to index in smart mode   We’ve improved the IDE startup experience by performing the Scanning files to index… process in smart mode, which makes the IDE’s full range of functionality available much earlier in the startup process. When opening a project, GoLand uses existing caches from your previous session with the project and simultaneously looks for files to index. If no changes are found in the scan, the IDE will be fully ready for you to work, eliminating the delays that were previously caused by indexing on startup.   Suggestion to reconfigure Windows Defender settings   There’s a new notification triggered when Windows Defender with Real-Time Protection is running. Given that these antivirus checks can significantly decrease the IDE speed, GoLand suggests adding specific folders to Defender’s list of exclusions. The notification provides options to either reconfigure these settings automatically or first check the Defender configuration instructions and do it manually.   Editor   The number of interface implementations is shown in the editor   Code Vision: Interfaces implementations   We’ve updated the Code Vision feature. GoLand now shows the number of implementations for an interface and its method specifications.   In the previous version, we introduced usages displayed near all functions and types showing how often the function or type is referenced in the current project. Also, the code authors are displayed if version control integration is enabled. Creating a custom regexp-based inspection   Custom RegExp-based inspections   You can now use regular expressions to create your own search and replace inspections. These inspections can be especially useful for highlighting style-based or formatting-based problems.   Go to Settings | Editor | Inspections and press the + icon. Select Add RegExp Search Inspection from the list, and you’ll be directed to a dialog where you can set up your new inspection. Select the desired language, use hints from the panel on the left to build a RegExp, and designate the required replacement. You can also specify how you want the IDE to highlight them in the project. Improved link to Go Playground is shown in GoLand   Go Playground: Version parameter in shared URL   In the 2022.3 version, we integrated the Go Playground functionality into GoLand.   In this version, we’ve improved that feature. First of all, shared URLs now include the version parameter if you choose the dev or previous versions.   We’ve also added an option to turn off the popup window that asks your permission to share code in the Playground. You can disable it in Settings | Go | Ask before sharing in Go Playground. A setting that allows control of the placement of the pasted content   Option to specify the placement of pasted content   We’ve fine-tuned the user experience when pasting a line that was copied or cut without selection. There’s now a special setting that allows you to control the placement of the pasted content.   In Settings | Advanced Settings, find the Editor section and select the desired behavior for the Paste action from the drop-down list. Whitespaces are shown as dots in the editor when the code is selected   Option to show whitespaces only in selected code   There’s a new Selection checkbox in Settings | Editor | General | Appearance | Show Whitespace that allows you to configure this setting so that the IDE shows whitespaces as small dots only when you select code. The spelling of hashes and special values is not underlined in the editor   No spell checks for hashes and special values   We’ve updated the Typo inspection so that it no longer checks the spelling of hashes and special values and doesn’t report them as misspelled. This update covers the following values: Md5, Sha1, and Sha256 hex values. Sha384 and Sha512 base64-encoded integrity values with the shaNNN– prefix. JWT tokens. The new Call group is shown in the Find Usages tool window   The new Call group in Find Usages   We’ve introduced a new Find Usages group for function calls – the Call group.   We’ve also implemented some fixes for how generic code element usage is represented in the Find Usages window.   User experience   Using the Zoom in functionality in GoLand to increase the size of all user interface elements   Full IDE zoom   It’s now possible to zoom into and out of GoLand entirely, increasing or decreasing the size of all UI elements at once. From the main menu, select View | Appearance | Switch Zoom IDE and adjust the IDE’s scaling. Remember size for each tool window setting is shown in the Appearance section   New Remember size for each tool window setting   We’ve introduced a new layout option that allows you to unify the width of the side tool windows or retain the ability to freely adjust their sizes as you customize your layout. The new Remember size for each tool window checkbox is available in Settings | Appearance | Appearance & Behavior | Tool Windows.   In the new UI, the setting is switched off by default, meaning that the tool windows are displayed with a unified width, and their sizes remain constant when you switch between them. In the old UI, the option is switched on, so the tool windows have different widths, though you can choose to align them at any time simply by turning the setting off. Arranging the tool windows and saving the layouts   Save multiple tool window layouts   You can now save and manage several tool window layouts and switch between them when needed.   To save a new layout, arrange the tool windows as desired and go to Window | Layouts | Save Current Layout as New. Once you adjust the arrangement, you can either update the currently used setup using the Save Changes in Current Layout option or save these changes for another custom layout. To activate a saved layout, find it in the list in Window | Layouts, hover over its name, and click Apply. These settings allow you to predefine the behavior of Actions on Save   Setting to configure Actions on Save for new projects   This version adds an option to predefine the behavior of Actions on Save for new projects.   For this, go to File | New Projects Setup | Preferences For New Projects | Tools | Actions on Save and select which actions you want to be triggered when saving changes in your projects.   The New UI   Last year, we introduced a new, more minimalist UI for GoLand and other JetBrains IDEs. We’ve been refining the new UI further based on your feedback. Read on to find out about the key changes to the new UI that have landed in this release. You can try our new UI by ticking the New UI checkbox in Settings | Appearance & Behavior.   Visit this page to learn more about the new UI. Turning Compact Mode on   Compact Mode   To improve the user experience with our new UI on smaller screens, we’ve introduced Compact Mode, which provides a more consolidated look and feel due to the reduced heights for toolbars and tool window headers, scaled-down spacings and paddings, and smaller icons and buttons.   To turn Compact Mode on, go to the View menu and select Appearance | Compact Mode.   Also, the top toolbar is no longer visible in Zen and Distraction Free modes. Tool windows are vertically split   Vertical split for tool windows   For the new UI, we’ve introduced the option to split the tool window area so that you can conveniently arrange these windows.   To add a tool window to this area and place it in the lower part, drag its icon along the sidebar and drop it under the separator. Alternatively, you can right-click on an icon to call the context menu and assign the new position for a tool window using the Move to action. Using project tabs to switch between projects in GoLand   Project tabs for macOS users   When you have several projects open, you can now easily switch between them using project tabs displayed under the main toolbar. To do this, go to Window | Merge All Project Windows. Tabs are shown in the dropdown menu   Show Hidden Tabs is back   We’ve added the Show Hidden Tabs feature in the new UI. You now have a drop-down showing the complete list of open tabs, as they may have been hidden before. A pane displays names of the files   Visible file name pane when tabs are hidden   We’ve fine-tuned the user experience of the new UI by adding a pane that displays the name of the file that is currently open when editor tabs are hidden. The redesigned Run widget is shown in the editor   Redesigned Run widget   We’ve redesigned the Run widget at the top of the IDE window. With the icons now colored green – rather than the area around them being blocked out in color – the appearance is subtler and easier on the eyes.   Docker   Using completion for a container name in testcontainers’ code   Completion for testcontainers   In this build, we’ve added completion for container names when you use the package.   After typing in the container name, you can use the Pull Docker image action that was implemented earlier. Log messages from different containers are shown in the same window   Merged log from all Docker Compose containers   The Dashboard tab of the Docker-compose node now pulls together logs from every Docker Compose container and displays them all in one place, updated in real time. Settings for Azure Registry connection are shown in the IDE   Support for Azure Container Registry   You can now easily connect to Azure Container Registry. Go to Settings | Build, Execution, Deployment | Docker | Docker Registry and set it up by selecting the Docker V2 option in the Registry input field. Settings for applying the :z mount option to bind volumes on SELinux are shown   New setting to apply the :z mount option to bind volumes on SELinux   Now you can add :z configuration flags to Docker bind mounts, which allows you to connect volumes to Docker containers on SELinux workstations. To enable this functionality, go to Settings | Advanced Settings | Docker.   Kubernetes   Creating a new Kubernetes resource   File templates in the New Kubernetes Resource popup   To make creating new Kubernetes files easier, we’ve added a new action – Kubernetes Resource – to the New menu that appears when you right-click in the Project tool window.   Once you select the Kubernetes Resource option, you’ll see a popup that features a list of the most popular resource types, such as Pod, Deployment, ConfigMap, etc. Adding a new Kubernetes Secret   Action to create new Kubernetes Secrets   We’ve introduced a new dialog to create Kubernetes Secrets.   To define a new secret, you can input a key and value manually. Alternatively, you can specify a file whose content will be used for the value of the resulting secret. Using Color-coded change markers   Color-coded change markers for resources loaded from cluster   When you use the View YAML action for resources from a cluster and make any changes in the opened file, the IDE highlights all of your edits with color-coded marks in the gutter. This way, you can be sure that the changes are made to the required parts of the resource before you apply them back to the cluster. Using the Compare with Cluster functionality   Additionally, using the Compare with Cluster icon, you can open a full diff view that will fetch the resource’s current version from the cluster and compare it with the local version. Opening a kubeconfig file in the editor from the Services view   Improved user experience with kubeconfig files   You can now easily access a kubeconfig file in the Services view and open it in the editor. If you change a kubeconfig file outside of GoLand, the IDE will detect this and automatically refresh its configuration in the Services tool window. Furthermore, the IDE now supports both code highlighting and completion for kubeconfig files. Assigning a shortcut to the Forward Ports action   Ability to assign custom shortcuts for actions in the Services view   You can now assign shortcuts for most Kubernetes actions in the Services view, like Forward Ports, Delete Resource, and Describe Resource, among others. To set your custom shortcuts, go to Settings | Keymap | Plugins | Kubernetes.   Markdown   Using an intention action to reformat a table in Markdown   Reformat table   A new intention action allows you to correct the formatting of tables in Markdown files. You can access the quick-fix via the shortcut Alt+Enter or by pressing the yellow bulb icon and selecting Reformat table from the list that appears. Using the Fill Paragraph editor action to break a long line into several lines   Fill Paragraph   The Fill Paragraph editor action is now supported for Markdown files, allowing you to break long texts into several lines of even length. To do this, set the caret inside the paragraph you want to edit and call the action from the Edit menu or search for the Fill Paragraph command using Search everywhere (Double Shift) and execute it. A page with the Markdown Smart Keys settings   New Smart Keys settings page   We’ve added a dedicated page for configuring and editing your Markdown preferences in Settings | Editor | General | Smart Keys. This page should make it easier to manage your preferences, as it provides separate checkboxes for various editor features, replacing the single checkbox previously stored in Settings | Languages & Frameworks.   Version control   Navigating between branches in GoLand   Improved Branches popup   We’ve improved the usability of the Branches popup. For instance, navigating between branches is now easier, as they are grouped and stored in expandable lists. Using completion in the Create New Branch popup window   Completion in the Create New Branch popup   We’ve implemented completion in the Create New Branch popup. Press Ctrl+Space, and the IDE will suggest relevant prefixes based on the names of existing local branches. Colors of objects in the Structure window change when new code is added   VCS status color hints in the Structure tool window   To make tracking changes to files more convenient, we’ve added color hints to the Structure tool window. The names of modified objects will now become blue, and the names of the newly added objects will appear in the tool window highlighted in green. The Notifications window shows the result of a pre-commit check   Background commit checks   We’ve reworked the behavior of the commit checks for Git and Mercurial to speed up the overall commit process. Checks are now performed in the background after you commit but before you push. Pull request window in GoLand   Improved code review workflow for GitHub   We’ve reworked the Pull Request tool window. It now features a dedicated tab for each pull request you open. The tab instantly displays the list of changed files but now provides less information than before. This allows you to better focus on your current task. There is now also a dedicated button to easily execute the action that’s considered the most important given the pull request’s current state.   Web development   The plugins page with the Astro plugin   Astro support   Astro support has landed in GoLand. You can get it through our new Astro plugin that can be installed from Settings | Plugins. The plugin provides basic functionality, including syntax highlighting, code completion with automatic imports, refactorings, navigation, correct formatting, and more. Converting strings to template literals   Automatic conversion of strings to template literals   GoLand will now automatically transform your single- or double-quoted strings into template literals whenever you type . This works for raw strings as well as for JSX properties.   Support for TypeScript in Vue template expressions   We’ve added TypeScript support in Vue templates when you set the attribute in a tag to . Previously, JavaScript was used regardless of the attribute in the tag.   Note: to learn about all of the web development improvements in the 2023.1 version, head over to the WebStorm What's New page.
编程小号
上一篇 2024-04-16 09:37
下一篇 2024-04-16 09:38

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://daima100.com/n-goland-jh/4260.html